/* Smart Notifier - Clean Structural Client Area Styles */

.smart-bar-layout,
.smart-modal-content,
.smart-floating-card,
.smart-inline-layout {
  background-color: var(--bg-color, #ffffff) !important;
  color: var(--text-color, #333333) !important;
  direction: var(--direction, rtl) !important;
  text-align: var(--text-align, right) !important;
  font-family:
    "system-ui", "-apple-system", "Segoe UI", "Roboto", sans-serif, "Tahoma";
  line-height: 1.6;
}

.smart-bar-layout p,
.smart-bar-layout h1,
.smart-bar-layout h2,
.smart-bar-layout h3,
.smart-bar-layout h4,
.smart-bar-layout h5,
.smart-bar-layout h6,
.smart-modal-content p,
.smart-modal-content h1,
.smart-modal-content h2,
.smart-modal-content h3,
.smart-modal-content h4,
.smart-modal-content h5,
.smart-modal-content h6,
.smart-floating-card p,
.smart-floating-card h1,
.smart-floating-card h2,
.smart-floating-card h3,
.smart-floating-card h4,
.smart-floating-card h5,
.smart-floating-card h6,
.smart-inline-layout p,
.smart-inline-layout h1,
.smart-inline-layout h2,
.smart-inline-layout h3,
.smart-inline-layout h4,
.smart-inline-layout h5,
.smart-inline-layout h6 {
  text-align: inherit; /* کمک به ارث‌بری تراز تگ‌های داخلی */
}

/* استایل دکمه بستن مشترک */
.notice-close-btn {
  cursor: pointer;
  font-weight: 300;
  font-size: 24px;
  color: var(--text-color, #333333) !important;
  opacity: 0.5;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  line-height: 0;
}
.notice-close-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* نوار اعلان بالا یا پایین */
.smart-bar-layout {
  padding: 14px 45px;
  position: relative;
  width: 100%;
  z-index: 999999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  font-weight: 500;
}
.smart-bar-layout .notice-close-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.smart-pos-bottom_footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
}
.smart-pos-top_header {
  position: relative;
  width: 100%;
}

/* پاپ‌آپ مودال وسط صفحه */
.smart-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000000;
  justify-content: center;
  align-items: center;
}
.smart-modal-content {
  width: 90%;
  max-width: 500px;
  padding: 32px;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
  animation: smart_fade_in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.smart-modal-content .notice-close-btn {
  position: absolute;
  top: 16px;
}

/* کارت شناور گوشه صفحه */
.smart-floating-card {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 360px;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.15);
  z-index: 999999;
  animation: smart_slide_up 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.smart-floating-card .notice-close-btn {
  position: absolute;
  top: 16px;
}

/* تزریق در تگ خاص قالب */
.smart-inline-layout {
  position: relative;
  width: 100%;
  margin: 0 !important;
  margin-bottom: 16px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  animation: smart_fade_in 0.3s ease;
}
.smart-inline-layout .notice-close-btn {
  position: absolute;
  top: 15px;
  z-index: 10;
}

/* پوزیشن پویای دکمه خروج بر اساس متغیرهای تزریقی */
.smart-bar-layout .notice-close-btn,
.smart-modal-content .notice-close-btn,
.smart-floating-card .notice-close-btn,
.smart-inline-layout .notice-close-btn {
  left: var(--close-btn-left, auto);
  right: var(--close-btn-right, auto);
}

@keyframes smart_fade_in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes smart_slide_up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
