/* Search Specific Styles */

/* Pro Badge (reused in various places) */
.pro-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.06em;
    vertical-align: 1px;
}

/* Pro Strip — below hero subtitle */
.pro-strip {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(59,130,246,0.15), 0 8px 32px rgba(0,0,0,0.12);
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    text-align: left;
    border: 1px solid rgba(59,130,246,0.2);
    position: relative;
}
.pro-strip:hover {
    box-shadow: 0 6px 28px rgba(59,130,246,0.22), 0 12px 40px rgba(0,0,0,0.15);
    transform: translateY(-1px);
    border-color: rgba(59,130,246,0.35);
}
.pro-badge-lg {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 5px;
    vertical-align: 1px;
}
.pro-strip-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    flex: 1;
    white-space: nowrap;
}
.pro-strip-action {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 8px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(59,130,246,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    flex-shrink: 0;
}
.pro-strip:hover .pro-strip-action {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59,130,246,0.45);
}

/* Hero Section override/extension */
.search-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    padding: 60px 0 80px;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Search Box Container - Floating effect */
.search-container {
    max-width: 1200px;
    margin: -60px auto 40px; /* Negative margin to overlap hero */
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.search-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px -4px rgba(0, 0, 0, 0.1), 0 8px 16px -4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 24px;
}

/* Tab/Filter toggles above search fields */
.search-options {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.option-pill {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-pill:hover {
    background: var(--bg-card-hover);
    color: var(--text-main);
}

.option-pill.active {
    background: #eff6ff;
    color: var(--primary);
}

/* Search Rows */
.search-row-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.search-row-2 {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1.2fr auto;
    gap: 16px;
    align-items: end;
}

.input-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-muted);
    margin-left: 4px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
    font-family: inherit;
}

.input-field:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.input-field::placeholder {
    color: #9ca3af;
}

/* Custom Calendar Trigger styling to match inputs */
.date-trigger-group {
    display: flex;
    gap: 8px;
}

.date-trigger {
    flex: 1;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.date-trigger:hover {
    border-color: var(--primary);
    background: #fff;
}

.date-trigger.placeholder {
    color: #9ca3af;
}

/* Swap Button */
.swap-btn {
    position: absolute;
    right: -26px;
    bottom: 8px;
    z-index: 20;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.swap-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(180deg);
}

/* Duration Inputs */
.duration-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 10px;
    transition: all 0.2s;
}

.duration-inputs:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.duration-input {
    width: 36px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-main);
}
.duration-input:focus { outline: none; }

.duration-sep {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Search Button */
.search-btn {
    height: 47px;
    padding: 0 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Results Area */
.results-container {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.results-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.results-meta {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-left: 8px;
}

/* Sorting */
.sort-options {
    display: flex;
    gap: 8px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 10px;
}

.sort-btn {
    border: none;
    background: transparent;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn.active {
    background: #fff;
    color: var(--text-main);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Flight Cards */
.flights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.flight-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.flight-card:hover {
    border-color: #93c5fd;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.1);
}

.flight-card.best-value {
    border: 1px solid #10b981;
    background: #f0fdf4;
}

.badge-best {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.fc-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.fc-price.cheap { color: #059669; }
.fc-price.expensive { color: #dc2626; }
.fc-price-label { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; vertical-align: 2px; margin-left: 4px; }

.fc-route {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fc-route-arrow { color: #d1d5db; }

.fc-details {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    border-radius: 16px;
}

.empty-icon {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Track Banner (top of results) */
.track-banner {
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.track-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.track-banner-success {
    background: linear-gradient(135deg, #064e3b, #065f46);
    border-color: rgba(255,255,255,0.08);
}
.track-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.track-banner-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #60a5fa;
}
.track-banner-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}
.track-banner-text strong { color: #fff; }
.track-banner-fields {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
}
.track-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.track-field-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.75);
    padding-left: 2px;
}
.track-banner-input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.track-banner-input::placeholder { color: rgba(255,255,255,0.45); }
.track-banner-input:focus { outline: none; background: rgba(255,255,255,0.12); border-color: rgba(96,165,250,0.5); }
.track-price-wrap {
    display: flex;
    align-items: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.07);
    transition: all 0.15s;
}
.track-price-wrap:focus-within { background: rgba(255,255,255,0.12); border-color: rgba(96,165,250,0.5); }
.track-price-dollar {
    padding: 8px 0 8px 10px;
    color: rgba(255,255,255,0.6);
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
}
.track-price-input {
    width: 72px;
    border: none !important;
    background: transparent !important;
    padding-left: 4px;
    color: #fff;
}
.track-price-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.track-price-input { -moz-appearance: textfield; }
.track-notify-info {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    white-space: nowrap;
    line-height: 1.4;
}
.track-notify-info a { color: #60a5fa; font-weight: 600; text-decoration: none; }
.track-notify-info a:hover { text-decoration: underline; }
.track-phone-form {
    display: flex;
    align-items: center;
    gap: 6px;
}
.track-phone-form input {
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: inherit;
    width: 140px;
    background: rgba(255,255,255,0.07);
    color: #fff;
}
.track-phone-form input:focus { outline: none; border-color: rgba(96,165,250,0.5); background: rgba(255,255,255,0.12); }
.track-phone-form button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #3b82f6;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.track-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}
.track-banner-btn:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); transform: translateY(-1px); }
.track-banner-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.track-banner-error {
    color: #fca5a5;
    font-size: 0.8rem;
    margin: 8px 0 0;
    width: 100%;
}
.track-banner-error:empty { display: none; }
.track-pro-nudge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1e3a5f 0%, #172554 100%);
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 8px;
    flex-wrap: wrap;
    width: max-content;
    max-width: 100%;
}
.track-pro-feats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-right: 10px;
}
.track-pro-feats span {
    font-size: 0.78rem;
    color: #fff;
    background: rgba(255,255,255,0.1);
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
}
.track-pro-nudge a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59,130,246,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    margin-left: 6px;
}
.track-pro-nudge a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59,130,246,0.45);
}

/* Condensed Search Summary */
.search-summary {
    max-width: 1200px;
    margin: 16px auto 24px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
}
.summary-content {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.15s;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
.summary-content:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(59,130,246,0.1);
}
.summary-sep { color: #d1d5db; font-size: 0.8rem; }
.summary-details { color: var(--text-muted); font-weight: 500; }
.summary-edit {
    background: none;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.15s;
}
.summary-edit:hover { background: #eff6ff; border-color: #93c5fd; }


/* ============ Calendar Chart ============ */
/* Timeline chart (horizontal Gantt) */
.timeline-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.timeline-scroll {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}
.timeline-inner {
    position: relative;
    min-width: 100%;
}
/* Date axis */
.tl-dates {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.tl-date {
    flex: 0 0 auto;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 0;
    border-right: 1px solid #f3f4f6;
    box-sizing: border-box;
}
.tl-date.month-start {
    font-weight: 800;
    color: var(--text-main);
}
.tl-date .tl-dow {
    font-size: 0.6rem;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tl-date.weekend { background: #fafafa; }
/* Grid lines */
.tl-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}
.tl-gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #f3f4f6;
}
.tl-gridline.month { background: #e5e7eb; }
/* Bar area */
.tl-bars {
    position: relative;
    padding: 6px 0;
}
.trip-bar {
    position: absolute;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 32px;
    z-index: 1;
}
.trip-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 3;
}
.trip-bar.cheap { background: #059669; }
.trip-bar.mid { background: #d97706; }
.trip-bar.expensive { background: #dc2626; }
.trip-bar .bar-price { font-weight: 800; }
.trip-bar .bar-dates {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.85;
    margin-left: 6px;
}
/* Tooltip on hover */
.trip-bar .bar-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e1b4b;
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10;
    pointer-events: none;
    line-height: 1.4;
}
.trip-bar .bar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e1b4b;
}
.trip-bar:hover .bar-tooltip { display: block; }

/* View toggle */
.view-toggle {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    padding: 3px;
    border-radius: 8px;
    margin-left: 12px;
}
.view-btn {
    border: none;
    background: transparent;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
    display: flex;
    align-items: center;
}
.view-btn.active { background: #fff; color: var(--text-main); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.view-btn svg { width: 16px; height: 16px; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-hero { padding: 40px 0 60px; }
    .search-container { margin-top: -40px; }
    .pro-strip { margin-top: 20px; padding: 12px 14px; gap: 10px; flex-direction: column; }
    .pro-strip-text { font-size: 0.8rem; white-space: normal; }
    .pro-strip-action { align-self: flex-start; }
    .search-row-1 { grid-template-columns: 1fr; }
    .search-row-2 { grid-template-columns: 1fr 1fr; }
    .input-dates { grid-column: span 2; }
    .input-submit { grid-column: span 2; }
    .swap-btn { display: none; }

    .track-banner { padding: 14px; }
    .track-banner-top { flex-direction: column; align-items: stretch; }
    .track-banner-fields { flex-wrap: wrap; }
    .track-field { flex: 1; min-width: 100px; }
    .track-banner-input { width: 100%; }
    .track-price-wrap { width: 100%; }
    .track-price-input { flex: 1; width: auto !important; }
    .track-banner-btn { flex: 1; min-width: 100px; justify-content: center; }
    .track-pro-nudge { padding-left: 0; }
    .track-pro-nudge a { margin-left: 0; margin-top: 6px; }

    .flights-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .flight-card { padding: 14px; }
    .fc-price { font-size: 1.5rem; }
    .fc-price-label { font-size: 0.6rem; }
    .fc-route { font-size: 0.8rem; margin-bottom: 12px; }
    .fc-details { font-size: 0.78rem; padding-top: 12px; }
    .badge-best { font-size: 0.6rem; padding: 3px 8px; }

    .results-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}

@media (max-width: 480px) {
    .flights-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .flight-card { padding: 12px; }
    .fc-price { font-size: 1.3rem; }
    .fc-route { font-size: 0.75rem; gap: 4px; }
}
