@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
    --v-primary: #A80000;
    --v-font: 'Plus Jakarta Sans', sans-serif;

    /* Default (Light Mode) */
    --v-bg-main: #ffffff;
    --v-bg-card: #f8f8f8;
    --v-border: rgba(0, 0, 0, 0.08);
    --v-text: #1a1a1a;
    --v-text-dim: #666666;
    --v-input-bg: #f0f0f0;
}

/* Dark Mode Detect (matches dum-cine logic) */
[data-theme='dark'],
.dark-mode,
body.dark {
    --v-bg-main: #000000;
    --v-bg-card: #0a0a0a;
    --v-border: rgba(255, 255, 255, 0.1);
    --v-text: #ffffff;
    --v-text-dim: #999999;
    --v-input-bg: #111111;
}

.dum-vuelos-wrapper {
    font-family: var(--v-font);
    color: var(--v-text);
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    -webkit-font-smoothing: antialiased;
}

.v-main-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--v-text);
    letter-spacing: -0.05em;
}

.v-search-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--v-primary);
}

.v-search-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    color: var(--v-text);
}

/* Force hide any auto-injected tags by WordPress */
.dum-vuelos-wrapper br,
.dum-vuelos-wrapper p:empty {
    display: none !important;
}

/* Trip Type Selector */
.v-trip-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.v-type-option {
    cursor: pointer;
    padding: 0.7rem 1.5rem;
    background: var(--v-bg-card);
    border: 1px solid var(--v-border);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--v-text-dim);
    transition: all 0.2s;
}

.v-type-option.active {
    background: var(--v-primary);
    color: #fff;
    border-color: var(--v-primary);
}

.v-type-option input {
    display: none;
}

/* Search Container */
.v-search-container {
    background: var(--v-bg-card);
    border: 1px solid var(--v-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: none !important;
}

.v-search-bar {
    position: relative;
    /* Now parent for suggestions */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.v-inputs-grid {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.v-button-row {
    width: 100%;
}

.v-input-field {
    flex: 1;
    background: var(--v-input-bg);
    border: 1px solid var(--v-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
    /* Removed position: relative to allow full-width suggestions */
}

.v-input-field:focus-within {
    border-color: var(--v-primary);
}

.v-input-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--v-primary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.v-input-field input,
.v-input-field select {
    width: 100%;
    background: transparent !important;
    border: none !important;
    color: var(--v-text) !important;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.v-input-field input::placeholder {
    color: var(--v-text-dim);
    opacity: 0.5;
}

.v-passengers-row select {
    cursor: pointer;
    text-align: right;
    width: auto !important;
}

.v-passengers-row input {
    text-align: center;
}

/* Suggestions */
.v-suggestions {
    position: absolute;
    top: 75px;
    /* Adjust based on input height */
    left: 0;
    right: 0;
    background: var(--v-bg-main);
    border: 1px solid var(--v-border);
    border-radius: 12px;
    z-index: 999999;
    display: none;
    overflow: hidden;
    margin-top: 5px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2) !important;
}

/* If the user strictly hates shadows, the border is enough but let's stick to a clean border */
[data-theme='dark'] .v-suggestions {
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5) !important;
}

.v-suggestion-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--v-border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    background: var(--v-bg-main);
}

.v-suggestion-item:hover {
    background: var(--v-primary);
}

.v-suggestion-item:hover .v-suggestion-name,
.v-suggestion-item:hover .v-suggestion-city {
    color: #fff;
}

.v-suggestion-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--v-text);
}

.v-suggestion-city {
    font-size: 0.8rem;
    color: var(--v-text-dim);
    display: block;
}

.v-suggestion-code {
    color: #fff;
    background: var(--v-primary);
    font-weight: 900;
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.v-suggestion-item:hover .v-suggestion-code {
    background: #fff;
    color: var(--v-primary);
}

/* Search Button */
.v-btn-search {
    background: linear-gradient(135deg, var(--v-primary) 0%, #800000 100%);
    color: #fff;
    border: none;
    height: 64px;
    width: 100%;
    border-radius: 16px;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    white-space: nowrap;
    box-shadow: none !important;
}

.v-btn-search span {
    margin-top: 2px;
}

.v-btn-search:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.v-btn-search:active {
    transform: translateY(-1px);
}

/* Results */
.v-flight-ticket {
    background: var(--v-bg-card);
    border: 1px solid var(--v-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 180px 1fr 220px;
    gap: 3rem;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: none !important;
    transition: transform 0.2s;
}

.v-flight-ticket:hover {
    border-color: var(--v-primary);
}

.v-airline-logo {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 18px !important;
    /* Slightly more rounded */
    padding: 12px;
    object-fit: contain;
    border: none;
    box-shadow: none !important;
    display: block;
}

.v-route-time {
    font-size: 2rem;
    font-weight: 900;
    color: var(--v-text);
    letter-spacing: -0.05em;
}

.v-route-iata {
    font-weight: 800;
    color: var(--v-primary);
    font-size: 1rem;
}

.v-path-line-container {
    width: 100%;
    height: 2px;
    background: var(--v-border);
    position: relative;
}

.v-path-plane-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--v-bg-card);
    padding: 0 15px;
    color: var(--v-primary) !important;
}

.v-path-plane-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--v-primary) !important;
}

.v-price-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--v-text);
    margin-top: 5px;
    margin-bottom: 20px;
}

.v-price-amount {
    font-size: 2.8rem;
    /* BIG PRICE */
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
}

.v-price-currency {
    font-size: 0.8rem;
    /* small currency */
    font-weight: 700;
    opacity: 0.5;
    text-transform: uppercase;
}

.v-btn-book {
    background: var(--v-primary);
    color: #fff;
    text-decoration: none;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Empty & Loader */
.v-empty-state {
    text-align: center;
    padding: 5rem;
    border: 1px solid var(--v-border);
    background: var(--v-bg-card);
    border-radius: 1.5rem;
    box-shadow: none !important;
}

.v-empty-state h2 {
    font-weight: 900;
    color: var(--v-text);
}

.v-empty-state p {
    color: var(--v-text-dim);
}

.v-loading-overlay {
    display: none;
    padding: 6rem;
    text-align: center;
    background: var(--v-bg-card);
    border: 1px solid var(--v-border);
    border-radius: 1.5rem;
    margin-top: 2rem;
}

.v-spinner-ring {
    width: 50px;
    height: 50px;
    border: 4px solid var(--v-border);
    border-top-color: var(--v-primary);
    border-radius: 50%;
    animation: spin 0.8s infinite linear;
    margin: 0 auto 1.5rem;
}

/* Mobile */
@media (max-width: 1024px) {
    .v-search-bar {
        flex-direction: column;
    }

    .v-input-field,
    .v-btn-search {
        width: 100%;
        height: 70px;
    }

    .v-flight-ticket {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
}

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