/* High-Fidelity Tourvisor Palette */
:root {
    --tv-blue: #0071da;
    --tv-blue-dark: #0056a8;
    --tv-orange: #ff7142;
    --tv-gray: #f2f2f2;
}

/* Main Form Container */
.tv-search-box {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}
.tv-main-row {
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: stretch;
    overflow: visible;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.tv-field {
    flex: 1;
    padding: 12px 15px;
    border-right: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.tv-field:first-child { border-radius: 12px 0 0 12px; }
.tv-field:hover { background: #fcfcfc; }
.tv-field .label {
    font-size: 11px;
    color: #999;
    text-transform: none;
    margin-bottom: 2px;
}
.tv-field .value {
    font-weight: 700;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-search-btn {
    background: var(--tv-orange);
    border: none;
    color: white;
    padding: 0 35px;
    font-weight: 700;
    font-size: 16px;
    border-radius: 0 12px 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}
.tv-search-btn:hover { background: #ff5a26; }

/* Tabs as Radio buttons */
.tv-tabs-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.tv-tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
    color: white;
}
.tv-tab-item:hover, .tv-tab-item.active { opacity: 1; }
.tv-tab-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tv-tab-item.active .tv-tab-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Sub Row Filters */
.tv-sub-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}
.tv-sub-field {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 15px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}
.tv-sub-field:hover { background: rgba(255, 255, 255, 0.18); }
.tv-sub-field input::placeholder { color: rgba(255,255,255,0.7); }
.tv-sub-field select option { background: white; color: #333; }

.tv-sub-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.tv-stars-wrap {
    display: flex;
    gap: 5px;
}
.tv-star-checkbox { display: none; }
.tv-star-label {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.tv-star-checkbox:checked + .tv-star-label {
    background: var(--tv-orange);
    border-color: var(--tv-orange);
    box-shadow: 0 0 15px rgba(255, 113, 66, 0.3);
}

/* Modal Styling (Alphabetical) */
.modal-tv {
    max-width: 900px;
}
.modal-tv .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-tv .modal-header {
    background: #f8f9fa;
    border-bottom: none;
    padding: 20px 30px;
}
.tv-modal-tabs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.tv-modal-tab {
    padding: 8px 16px;
    border-radius: 20px;
    background: white;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border: 1px solid #ddd;
}
.tv-modal-tab.active {
    background: var(--tv-blue-dark);
    color: white;
    border-color: var(--tv-blue-dark);
}

.tv-alphabet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 30px;
    max-height: 500px;
    overflow-y: auto;
}
.tv-letter-group h6 {
    color: var(--tv-blue);
    font-weight: 800;
    margin-bottom: 10px;
    font-size: 18px;
}
.tv-city-link {
    display: block;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 5px;
    transition: color 0.2s;
}
.tv-city-link:hover { color: var(--tv-blue); }
.tv-city-link.bold { font-weight: 700; }

/* Country Selection Grid */
.tv-country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 20px;
}
.tv-country-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.tv-country-card:hover {
    background: white;
    border-color: var(--tv-blue);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 113, 218, 0.1);
}
.tv-country-card i {
    font-size: 24px;
    color: var(--tv-blue);
}
.tv-country-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

/* Nights Range Grid */
.tv-nights-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 20px;
}
.tv-night-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid transparent;
    font-size: 14px;
}
.tv-night-item:hover {
    background: #e9ecef;
    border-color: var(--tv-blue);
}
.tv-night-item.active {
    background: var(--tv-blue);
    color: white;
    border-color: var(--tv-blue);
}
.tv-night-item.in-range {
    background: rgba(0, 113, 218, 0.1);
    color: var(--tv-blue);
}

/* Travelers Counters */
.tv-counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.tv-counter-row:last-child { border-bottom: none; }
.tv-counter-label {
    font-weight: 600;
    font-size: 15px;
}
.tv-counter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}
.tv-counter-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--tv-blue);
    font-size: 18px;
}
.tv-counter-btn:hover:not(:disabled) {
    border-color: var(--tv-blue);
    background: rgba(0, 113, 218, 0.05);
}
.tv-counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.tv-counter-val {
    font-weight: 700;
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.cursor-pointer { cursor: pointer; }

/* Responsive adjustments */
@media (max-width: 991px) {
    .tv-main-row { flex-wrap: wrap; }
    .tv-field { flex: 1 1 50%; border-bottom: 1px solid #eee; }
    .tv-field:nth-child(even) { border-right: none; }
    .tv-search-btn { flex: 1 1 100%; border-radius: 0 0 12px 12px; height: 60px; justify-content: center; }
}

@media (max-width: 576px) {
    .tv-field { flex: 1 1 100%; border-right: none; }
}
