* {
  font-family: 'Vazirmatn', sans-serif;
}

/* RTL Specific Styles */
.text-right { text-align: right; }
.text-left { text-align: left; }
.flex-row-reverse { flex-direction: row-reverse; }
.mr-auto { margin-right: auto; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-right: 0.5rem; margin-left: 0; }
.ml-3, .ml-4 { margin-right: 0.75rem; margin-left: 0; }
.mr-4 { margin-left: 1rem; margin-right: 0; }
.pl-3 { padding-right: 0.75rem; padding-left: 0; }
.pr-4 { padding-left: 1rem; padding-right: 0; }
.pr-10 { padding-left: 2.5rem; padding-right: 0; }
.border-l-4 { border-right-width: 4px; border-left-width: 0; }

.space-x-4 > * + * { margin-right: 1rem; margin-left: 0; }
.space-x-8 > * + * { margin-right: 2rem; margin-left: 0; }

/* Media Queries */
@media (min-width: 640px) {
  .sm\:space-x-8 > * + * { margin-right: 2rem; margin-left: 0; }
  .sm\:ml-6 { margin-right: 1.5rem; margin-left: 0; }
  .sm\:text-center { text-align: center; }
}

@media (min-width: 1024px) {
  .lg\:text-left { text-align: right; }
}

/* Input Styling */
.input-container {
  position: relative;
  margin-top: 0.35rem;
}

.input-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 1rem;
  pointer-events: none;
}

.input-field {
  display: block;
  width: 100%;
  padding: 0.65rem 2.25rem 0.65rem 0.75rem;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input-field:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.input-field:hover:not(:focus) {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Custom Date Picker */
.date-input-wrapper { position: relative; }

.date-input {
  cursor: pointer;
  color: #374151;
  text-align: right;
  caret-color: transparent;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="date"]::-moz-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.custom-calendar {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: 300px;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: none;
  overflow: hidden;
  animation: fadeIn 0.2s ease-in-out;
}

.custom-calendar.show { display: block; }

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: #f0f9ff;
  border-bottom: 1px solid #e0f2fe;
}

.calendar-title {
  font-weight: 600;
  color: #0284c7;
  font-size: 1rem;
}

.calendar-nav {
  display: flex;
  align-items: center;
}

.calendar-nav-btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: white;
  border: 1px solid #e0f2fe;
  color: #0284c7;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 0.25rem;
}

.calendar-nav-btn:hover { background-color: #e0f2fe; }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  padding: 0.5rem 0;
  background-color: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
}

.calendar-weekday {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  padding: 0.5rem 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0.5rem;
  gap: 0.25rem;
}

.calendar-day {
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color: #374151;
}

.calendar-day:hover:not(.disabled):not(.selected) { background-color: #f3f4f6; }
.calendar-day.today { font-weight: 600; border: 1px dashed #0ea5e9; }
.calendar-day.selected { background-color: #0ea5e9; color: white; font-weight: 600; }
.calendar-day.disabled { color: #d1d5db; cursor: not-allowed; }
.calendar-day.range-start { background-color: #0ea5e9; color: white; border-radius: 0.375rem 0 0 0.375rem; }
.calendar-day.range-end { background-color: #0ea5e9; color: white; border-radius: 0 0.375rem 0.375rem 0; }
.calendar-day.in-range { background-color: #e0f2fe; color: #0284c7; }

.calendar-footer {
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #f3f4f6;
  background-color: #f9fafb;
}

.calendar-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-btn-apply { background-color: #0ea5e9; color: white; }
.calendar-btn-apply:hover { background-color: #0284c7; }
.calendar-btn-cancel { background-color: white; color: #6b7280; border: 1px solid #e5e7eb; }
.calendar-btn-cancel:hover { background-color: #f3f4f6; }

.date-badge {
  position: absolute;
  top: -0.5rem;
  right: 0.75rem;
  background-color: #0ea5e9;
  color: white;
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  font-weight: 500;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Airport Dropdown */
.airport-input-wrapper { position: relative; overflow: visible; }

.airport-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  max-height: 250px;
  overflow-y: auto;
  display: none;
  text-align: right;
  width: 100%;
  min-width: 280px;
}

.airport-dropdown.show { display: block; animation: fadeIn 0.2s ease-in-out; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.airport-option {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
}

.airport-option:last-child { border-bottom: none; }
.airport-option:hover { background-color: #f0f9ff; }

.airport-code {
  font-weight: 600;
  color: #0284c7;
  display: inline-block;
  background-color: #e0f2fe;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

.airport-name {
  font-size: 0.85rem;
  color: #4b5563;
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* Flight Card */
.flight-card {
  background-color: white;
  border-radius: 0.75rem;
  border: 1px solid #f3f4f6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  margin-bottom: 1rem;
}

.flight-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.flight-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  background-color: #f9fafb;
}

.airline-info { display: flex; align-items: center; }

.airline-logo {
  width: 2.2rem;
  height: 2.2rem;
  /* background-color: #e0f2fe; */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.75rem;
  color: #0284c7;
  font-weight: bold;
  font-size: 0.8rem;
}

.flight-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.8rem;
  background-color: #e0f2fe;
  color: #0284c7;
}

.flight-tag-icon { margin-left: 0.25rem; font-size: 0.8rem; }

.flight-card-body {
  padding: 1rem;
  display: flex;
  align-items: center;
  position: relative;
}

.flight-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.flight-point { text-align: center; flex: 1; }

.flight-time {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
}

.flight-code {
  font-size: 0.8rem;
  font-weight: 500;
  color: #4b5563;
  margin-top: 0.25rem;
}

.flight-city { font-size: 0.75rem; color: #6b7280; }

.flight-path {
  position: relative;
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.flight-path-line {
  height: 2px;
  background-color: #e5e7eb;
  width: 100%;
  position: relative;
}

.flight-path-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(180deg);
  background-color: white;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0284c7;
  font-size: 0.8rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.flight-duration {
  font-size: 0.7rem;
  color: #6b7280;
  position: absolute;
  bottom: -1.25rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background-color: #f9fafb;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #e5e7eb;
}

.flight-card-footer {
  padding: 1rem;
  border-top: 1px solid #f3f4f6;
  background-color: #f9fafb;
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.75rem;
  /* justify-items: center; */
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .providers-grid { grid-template-columns: repeat(3, 1fr); }
}

.provider-card {
  background-color: white;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.provider-card:hover {
  border-color: #bae6fd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.provider-card.best-price {
  border-color: #0ea5e9;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.1);
}

.best-price-badge {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #0ea5e9;
  color: white;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  font-weight: 500;
  border-radius: 0 0 0.375rem 0;
}

.provider-info {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.provider-logo {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  color: #4b5563;
  font-size: 0.6rem;
}

.provider-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
}

.provider-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0284c7;
  margin-top: auto;
}

.provider-card.best-price .provider-price { color: #0ea5e9; }

.select-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background-color: #0284c7;
  color: white;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  width: 100%;
}

.select-button:hover { background-color: #0369a1; }

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .flight-route { flex-direction: column; gap: 1.5rem; }
  .flight-path { transform: rotate(90deg); margin: 1rem 0; width: 50%; }
  .flight-duration { transform: translateX(-50%) rotate(-90deg); }
}

/* Loading State */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  text-align: center;
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #e0f2fe;
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spinner 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1rem;
  color: #4b5563;
  font-weight: 500;
}

/* No Results State */
.no-results-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  text-align: center;
}

.no-results-icon {
  font-size: 3rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.no-results-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.no-results-text {
  font-size: 0.95rem;
  color: #6b7280;
  max-width: 24rem;
  margin: 0 auto 1.5rem;
}

.no-results-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background-color: #f3f4f6;
  color: #4b5563;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  font-size: 0.9rem;
}

.no-results-button:hover { background-color: #e5e7eb; }

/* Navigation Bar */
.nav-container {
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #e5e7eb;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
  padding: 0 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: #075985;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
}

.nav-logo:hover { color: #0284c7; }

.nav-logo-icon {
  margin-left: 0.5rem;
  color: #0ea5e9;
  font-size: 1.75rem;
}

.nav-links { display: flex; height: 100%; }

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0 1rem;
  height: 4rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4b5563;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #1f2937;
  background-color: rgba(243, 244, 246, 0.5);
}

.nav-link.active {
  color: #0284c7;
  border-bottom-color: #0284c7;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #0284c7;
  border-radius: 3px 3px 0 0;
}

.nav-link-icon {
  margin-left: 0.5rem;
  font-size: 1rem;
}

.nav-actions { display: flex; align-items: center; }

.nav-icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: #4b5563;
  margin-left: 0.75rem;
  transition: all 0.2s ease;
}

.nav-icon-button:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  background-color: #0284c7;
  color: white;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-button:hover {
  background-color: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-button-icon { margin-left: 0.5rem; }

.mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  color: #4b5563;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mobile-menu-button:hover {
  color: #1f2937;
  background-color: #f3f4f6;
}

.mobile-menu {
  background-color: white;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  color: #4b5563;
  border-right: 3px solid transparent;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  background-color: #f9fafb;
  color: #1f2937;
  border-right-color: #d1d5db;
}

.mobile-nav-link.active {
  background-color: #f0f9ff;
  color: #0284c7;
  border-right-color: #0284c7;
  font-weight: 500;
}

.mobile-nav-icon {
  margin-left: 0.75rem;
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
}

/* Form and Widget */
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.35rem;
}

.search-widget {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.8);
  padding: 1.5rem;
  margin-top: -5rem;
  position: relative;
  z-index: 20;
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(to left, #0284c7, #0ea5e9);
  color: white;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
  font-size: 0.95rem;
}

.search-button:hover {
  background: linear-gradient(to left, #0369a1, #0284c7);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(14, 165, 233, 0.4);
}

.search-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.4);
}

.search-button-icon { margin-left: 0.5rem; }

/* Dropdown and Widget Containers */
.widget-container { position: relative; z-index: 1; }
.widget-container:hover { z-index: 10; }
.dropdown-container { position: relative; z-index: auto; }
.dropdown-container:focus-within { z-index: 9999; }
.icon { display: inline-flex; align-items: center; justify-content: center; }

/* Responsive Adjustments */
@media (max-width: 768px) {
  .nav-inner { height: 3.5rem; }
  .nav-logo { font-size: 1.25rem; }
  .nav-logo-icon { font-size: 1.5rem; }
  .search-widget { margin-top: -3rem; padding: 1.25rem; }
  .form-label { font-size: 0.85rem; }
  .custom-calendar { width: 280px; }
}

/* Loader Animation */
@keyframes animloader {
  0% { left: 0; transform: translateX(-100%); }
  100% { left: 100%; transform: translateX(0%); }
}