@font-face {
  font-family: 'Vazir';
  src: url('/static/Vazirmatn-Regular.woff2') format('woff2');
}

:root {
  /* Primary Blues */
  --primary-blue: #2563eb;
  --primary-blue-dark: #1e40af;
  --primary-blue-light: #3b82f6;
  --primary-blue-ultra-light: #60a5fa;

  /* Secondary Blues */
  --secondary-blue: #0ea5e9;
  --secondary-blue-dark: #0284c7;
  --secondary-blue-light: #38bdf8;

  /* Background Blues */
  --bg-blue-50: #eff6ff;
  --bg-blue-100: #dbeafe;
  --bg-blue-200: #bfdbfe;
  --bg-blue-300: #93c5fd;

  /* Accent Colors */
  --accent-indigo: #6366f1;
  --accent-sky: #0ea5e9;
  --accent-teal: #14b8a6;

  /* Supporting Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Primary Gradients */
  --gradient-blue-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --gradient-blue-vibrant: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  --gradient-blue-deep: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);

  /* Multi-color Gradients */
  --gradient-blue-cyan: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  --gradient-blue-indigo: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --gradient-sky-teal: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);

  /* Background Gradients */
  --gradient-bg-light: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  --gradient-bg-medium: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  --gradient-bg-blue-white: linear-gradient(to bottom, #eff6ff 0%, #ffffff 100%);

  /* Card Gradients */
  --gradient-card-1: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  --gradient-card-2: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  --gradient-card-3: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);

  /* Hover Gradients */
  --gradient-hover: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  --gradient-active: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);

  /* Shadows */
  --shadow-blue-sm: 0 1px 2px 0 rgba(37, 99, 235, 0.05);
  --shadow-blue-md: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
  --shadow-blue-lg: 0 10px 15px -3px rgba(37, 99, 235, 0.15);
  --shadow-blue-xl: 0 20px 25px -5px rgba(37, 99, 235, 0.2);
}

body {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #fff;
  font-family: Vazir, sans-serif;
  direction: rtl;
  margin: 0;
  padding: 0;
}

* {
  box-sizing: border-box;
  font-family: Vazir, sans-serif;
}

.content {
  width: 100%;
}

.panel-header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-blue) 50%, var(--primary-blue-dark) 100%);
  color: white;
  border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow-blue-lg);
}

.panel-navbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: #fff;
  border-radius: 8px;
  padding: 8px 8px;
}

.site-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}
.site-icon img {
  height: 32px;
  width: auto;
  margin-left: 8px;
}
.site-icon .logo-text {
  color: var(--primary-blue);
  font-weight: 900;
  line-height: 140%;
  text-align: right;
}

.panel-navbar .btn {
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.hamburger-icon {
  background: url('/static/img/hamburger-icon.svg') no-repeat center;
}
.cross-icon {
  background: url('/static/img/cross-icon.svg') no-repeat center;
}
.back-icon {
  opacity: 0;
  pointer-events: none;
  cursor: auto;
  background: url('/static/img/arrow-left-green-icon.svg') no-repeat center;
}
.back-icon.show {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  background-color: #fffa;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: right 0.6s ease-in-out, opacity 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.sidebar.open {
  right: 0;
  opacity: 1;
  pointer-events: auto;
  transition: right 0.6s ease-in-out, opacity 0.4s ease-in-out;
}
.sidebar .header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  margin: 10px 16px;
  border-radius: 8px;
  background: #fff;
  width: 90%;
}
.sidebar .header .btn {
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.sidebar .items {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  justify-self: center;
  min-width: 221px;
  width: max-content;
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar .items li {
  width: 100%;
  padding: 10px 16px;
  text-align: center;
}
.sidebar .items li a {
  display: block;
  width: 100%;
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 2px solid rgba(37, 99, 235, 0.33);
  border-radius: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.sidebar .items li a.expandable::before {
  content: '';
  display: block;
  background-color: #e0f1e9;
  background: url('/static/img/down-arrow-head-icon.svg') no-repeat center;
  width: 16px;
  height: auto;
  transition: transform 0.3s ease;
}
.sidebar .items li a.expandable.expanded::before {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}
.sidebar .items li ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar .items li ul a {
  border-bottom: 1px solid #e0f1e9;
}

.sidebar .footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  direction: ltr;
  padding: 10px 0;
  margin-top: auto;
}
.sidebar .footer a {
  width: 100%;
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
}
.sidebar .footer .phone::before {
  content: '';
  display: inline-block;
  background: url('/static/img/phone-icon.svg') no-repeat center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
}
.sidebar .footer .email::before {
  content: '';
  display: inline-block;
  background: url('/static/img/envelope-icon.svg') no-repeat center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
}
.sidebar .footer a:hover {
  background-color: #e0f1e9;
}

.error {
  color: #f44336;
  background-color: #fefefe;
  border: 1px solid #ff8f87;
  border-radius: 4px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin: 20px 10px;
}
.error .buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.error .btn {
  background-color: #6aa0d0;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.hidden {
  display: none !important;
}

.disabled {
  opacity: 0.9 !important;
  pointer-events: none !important;
}

.toast.custom-toast {
  color: white;
  border-radius: 8px;
}
.toast.toast-success {
  background: var(--gradient-blue-vibrant);
}
.toast.toast-info {
  background: var(--gradient-blue-primary);
}
.toast.toast-error {
  background: linear-gradient(to left, #f44336, #d05858);
}
.toast.toast-warning {
  background: linear-gradient(to left, #ff9800, #ffb74d);
}

/* Safari Warning Banner */
.safari-warning-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.9em;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  animation: slideInWarning 0.6s ease-out 0.5s both;
  border-radius: 0 0 12px 12px;
}

@keyframes slideInWarning {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.safari-warning-banner.show {
  transform: translateY(0);
}

.safari-warning-banner .banner-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.safari-warning-banner .banner-text {
  flex: 1;
  min-width: 250px;
  line-height: 1.4;
}

.safari-warning-banner .banner-text .icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E")
    center/contain no-repeat;
}

.safari-warning-banner .banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.safari-warning-banner .banner-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.safari-warning-banner .banner-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .safari-warning-banner {
    padding: 10px 12px;
    font-size: 0.85em;
  }

  .safari-warning-banner .banner-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .safari-warning-banner .banner-text {
    min-width: auto;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  margin-bottom: 20px;
}
.form-group input {
  height: 40px;
  color: #212121;
  border: 1px solid #cbcbcb;
  border-radius: 9px;
  padding: 10px 10px 10px 5px;
  font-weight: 400;
  font-size: 16px;
  line-height: 180%;
  transition: all 0.3s ease;
}
.form-group label {
  position: absolute;
  top: 0;
  right: 10px;
  font-weight: 400;
  font-size: 16px;
  line-height: 180%;
  color: #757575;
  margin-top: -4px;
  pointer-events: none;
  transform-origin: right top;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  transform: translateY(-18px) scale(0.8);
}

.form-group input:focus {
  border-color: var(--primary-blue);
  outline: none;
}

input[type='tel'],
input[type='number'] {
  direction: ltr;
  text-align: left;
}

[x-cloak] {
  display: none !important;
}

.w-100 {
  width: 100% !important;
}

.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.loader {
  width: 60px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side, var(--primary-blue) 90%, rgba(37, 99, 235, 0));
  background: var(--_g) 0% 50%, var(--_g) 50% 50%, var(--_g) 100% 50%;
  background-size: calc(100% / 3) 50%;
  animation: l3 1s infinite linear;
}
@keyframes l3 {
  20% {
    background-position: 0% 0%, 50% 50%, 100% 50%;
  }
  40% {
    background-position: 0% 100%, 50% 0%, 100% 50%;
  }
  60% {
    background-position: 0% 50%, 50% 100%, 100% 0%;
  }
  80% {
    background-position: 0% 50%, 50% 50%, 100% 100%;
  }
}
