/* Flight Search Widget - Scoped CSS with fsw- namespace */
.fsw-widget-wrapper {
    /* Scoped CSS Variables */
    --fsw-background: #f8fafc;
    --fsw-foreground: #0f172a;
    --fsw-card: #ffffff;
    --fsw-card-foreground: #0f172a;
    --fsw-popover: #ffffff;
    --fsw-popover-foreground: #0f172a;
    --fsw-primary: #c6502e;
    --fsw-primary-foreground: #ffffff;
    --fsw-secondary: #f1f5f9;
    --fsw-secondary-foreground: #0f172a;
    --fsw-muted: #f1f5f9;
    --fsw-muted-foreground: #64748b;
    --fsw-accent: #f1f5f9;
    --fsw-accent-foreground: #0f172a;
    --fsw-border: #e2e8f0;
    --fsw-input: #ffffff;
    --fsw-input-border: #d1d5db;
    --fsw-input-border-focus: #c6502e;
    --fsw-ring: #c6502e;
    --fsw-shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --fsw-shadow-widget: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --fsw-shadow-button: 0 1px 2px 0 rgba(198, 80, 46, 0.05);
    --fsw-radius: 0.75rem;
    
    /* Reset and isolate styles */
    line-height: 1.5 !important;
    color: var(--fsw-foreground) !important;
    box-sizing: border-box !important;
}

.fsw-widget-wrapper *,
.fsw-widget-wrapper *::before,
.fsw-widget-wrapper *::after {
    box-sizing: border-box !important;
}
.fsw-widget-wrapper {
    border: 1px solid #CCC !important;
    margin-bottom: 15px;
    margin-top: 15px;
    border-left: none !important;
    border-right: none !important;
}

/* Container */
.fsw-widget-wrapper .fsw-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.fsw-widget-wrapper .fsw-widget-container {
    margin-bottom: 3rem !important;
    margin-top: 3rem !important;
}

/* Flight search widget */
.fsw-widget-wrapper .fsw-flight-search {
    position: relative !important;
}

.fsw-widget-wrapper .fsw-flight-card {
    width: 100% !important;
    max-width: 700px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--fsw-card) !important;
    border-radius: var(--fsw-radius) !important;
    box-shadow: none !important;
    border: none !important;
}

.fsw-widget-wrapper .fsw-flight-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--fsw-foreground) !important;
    margin-bottom: 0.75rem !important;
    margin-top: 0 !important;
}

/* Form layout */
.fsw-widget-wrapper .fsw-form-section {
    margin-bottom: 1rem !important;
}

.fsw-widget-wrapper .fsw-form-row {
    display: grid !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
}

.fsw-widget-wrapper .fsw-desktop-layout {
    display: none !important;
}

.fsw-widget-wrapper .fsw-mobile-layout {
    display: block !important;
}

@media (min-width: 768px) {
    .fsw-widget-wrapper .fsw-desktop-layout {
        display: block !important;
    }
    .fsw-widget-wrapper .fsw-mobile-layout {
        display: none !important;
    }
}

/* Desktop specific layouts */
.fsw-widget-wrapper .fsw-desktop-row {
    grid-template-columns: 1fr 1fr auto !important;
    align-items: end !important;
    gap: 1rem !important;
}

/* Mobile layout */
.fsw-widget-wrapper .fsw-mobile-fields {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

/* Input field */
.fsw-widget-wrapper .fsw-input-group {
    position: relative !important;
    width: 100% !important;
    display: block !important;
}

.fsw-widget-wrapper .fsw-input-label {
    display: block !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--fsw-muted-foreground) !important;
    margin-bottom: 0.25rem !important;
}

.fsw-widget-wrapper .fsw-input-field {
    width: 100% !important;
    max-width: none !important;
    height: 3.5rem !important;
    padding: 0 !important;
    padding-left: 2.5rem !important;
    border: 1px solid var(--fsw-input-border) !important;
    border-radius: 0.375rem !important;
    background: var(--fsw-input) !important;
    font-size: 1rem !important;
    transition: border-color 0.2s !important;
    font-family: inherit !important;
}

.fsw-widget-wrapper .fsw-input-field:focus {
    outline: none !important;
    border-color: var(--fsw-input-border-focus) !important;
}

.fsw-widget-wrapper .fsw-input-icon {
    position: absolute !important;
    left: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 1rem !important;
    height: 1rem !important;
    color: var(--fsw-muted-foreground) !important;
    z-index: 10 !important;
}


/* Button styles */
.fsw-widget-wrapper .fsw-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
    border-radius: 0.375rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    font-family: inherit !important;
}

.fsw-widget-wrapper .fsw-btn:disabled {
    pointer-events: none !important;
    opacity: 0.5 !important;
}

.fsw-widget-wrapper .fsw-btn-outline {
    border: 1px solid var(--fsw-input-border) !important;
    background: var(--fsw-background) !important;
    color: var(--fsw-foreground) !important;
    height: 3.5rem !important;
    padding: 0 1rem !important;
    justify-content: flex-start !important;
    text-align: left !important;
    font-weight: normal !important;
}

.fsw-widget-wrapper .fsw-btn-outline:hover {
    background: var(--fsw-accent) !important;
    color: var(--fsw-accent-foreground) !important;
}

.fsw-widget-wrapper .fsw-btn-primary {
    background: linear-gradient(135deg, var(--fsw-primary), #b8431a) !important;
    color: var(--fsw-primary-foreground) !important;
    height: 3.5rem !important;
    padding: 0 2rem !important;
    font-weight: 600 !important;
    box-shadow: var(--fsw-shadow-button) !important;
    border-radius: 9999px !important;
}

.fsw-widget-wrapper .fsw-btn-primary:hover {
    background: linear-gradient(135deg, #b8431a, #a33d18) !important;
    box-shadow: 0 4px 12px 0 rgba(198, 80, 46, 0.15) !important;
}

.fsw-widget-wrapper .fsw-btn-sm {
    height: 2.25rem !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
}

/* Autocomplete dropdown */
.fsw-widget-wrapper .fsw-autocomplete-container {
    position: relative !important;
}

.fsw-widget-wrapper .fsw-autocomplete-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    margin-top: 0.25rem !important;
    background: var(--fsw-popover) !important;
    border: 1px solid var(--fsw-border) !important;
    border-radius: 0.375rem !important;
    box-shadow: var(--fsw-shadow-widget) !important;
    max-height: 16rem !important;
    overflow-y: auto !important;
    display: none !important;
}

.fsw-widget-wrapper .fsw-autocomplete-dropdown.show {
    display: block !important;
}

@media (min-width: 768px) {
    .fsw-widget-wrapper .fsw-autocomplete-dropdown {
        min-width: 24rem !important;
        width: 24rem !important;
    }
}

.fsw-widget-wrapper .autocomplete-item {
    padding: 0.75rem 1rem !important;
    cursor: pointer !important;
    border-bottom: 1px solid var(--fsw-border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.fsw-widget-wrapper .autocomplete-item:last-child {
    border-bottom: none !important;
}

.fsw-widget-wrapper .autocomplete-item:hover {
    background: var(--fsw-accent) !important;
    color: var(--fsw-accent-foreground) !important;
}

.fsw-widget-wrapper .autocomplete-item-main {
    display: flex !important;
    flex-direction: column !important;
}

.fsw-widget-wrapper .autocomplete-item-city {
    font-weight: 500 !important;
    color: var(--fsw-foreground) !important;
}

.fsw-widget-wrapper .autocomplete-item-name {
    font-size: 0.875rem !important;
    color: var(--fsw-muted-foreground) !important;
}

.fsw-widget-wrapper .autocomplete-item-code {
    font-size: 0.875rem !important;
    font-family: monospace !important;
    color: var(--fsw-muted-foreground) !important;
}

.fsw-widget-wrapper .autocomplete-no-results {
    padding: 0.75rem 1rem !important;
    color: var(--fsw-muted-foreground) !important;
    text-align: center !important;
}

/* Date Range Input - Flatpickr Integration */
.fsw-widget-wrapper .fsw-date-range-container {
    position: relative !important;
}

.fsw-widget-wrapper .fsw-date-range-input {
    width: 100% !important;
    max-width: none !important;
    height: 3.5rem !important;
    padding: 0 1rem !important;
    padding-left: 2.5rem !important;
    border: 1px solid var(--fsw-input-border) !important;
    border-radius: 0.375rem !important;
    background: var(--fsw-input) !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: border-color 0.2s !important;
}

.fsw-widget-wrapper .fsw-date-range-input:focus {
    outline: none !important;
    border-color: var(--fsw-input-border-focus) !important;
}


/* Responsive utilities */
@media (max-width: 767px) {
    .fsw-widget-wrapper .fsw-btn-primary {
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
    
    .fsw-widget-wrapper .fsw-flight-card {
        padding: 0 !important;
    }
    
    .fsw-widget-wrapper .fsw-input-field,
    .fsw-widget-wrapper .fsw-date-range-input,
    .fsw-widget-wrapper .fsw-btn-outline {
        height: 3.5rem !important;
    }
}

@media (min-width: 768px) {
    .fsw-widget-wrapper .fsw-flight-card {
        padding: 0 !important;
    }
}

/* Search button container */
.fsw-widget-wrapper .fsw-search-button-container {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

@media (max-width: 767px) {
    .fsw-widget-wrapper .fsw-search-button-container {
        justify-content: center !important;
    }
}

/* Icons */
.fsw-widget-wrapper .fsw-icon {
    width: 1rem !important;
    height: 1rem !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.fsw-widget-wrapper .fsw-icon-lg {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay {
  background: #c6502e;
  -webkit-box-shadow: none;
  box-shadow: none;
  color: #fff;
  border-color: #c6502e;