/* First Time Visitor Popup Styles */

.first-time-visitor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: overlayFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.first-time-visitor-overlay.show {
    display: flex;
}

.first-time-visitor-popup {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3), 
                0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: popupSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.first-time-visitor-popup h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 700;
}

.first-time-visitor-popup p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.vehicle-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 35px;
    animation: gridSlideUp 0.6s ease-out 0.2s both;
}

.vehicle-type-option {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.vehicle-type-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.vehicle-type-option:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(33, 150, 243, 0.25),
                0 4px 15px rgba(33, 150, 243, 0.1);
}

.vehicle-type-option:hover::before {
    left: 100%;
}

.vehicle-type-option:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.vehicle-type-option.selected {
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    border-color: #1565c0;
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 40px rgba(33, 150, 243, 0.4),
                0 5px 20px rgba(33, 150, 243, 0.2);
    animation: selectedPulse 0.6s ease-out;
}

.vehicle-type-label {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.popup-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: buttonsSlideUp 0.7s ease-out 0.4s both;
}

.popup-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 130px;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.popup-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: width 0.4s ease, height 0.4s ease;
    transform: translate(-50%, -50%);
}

.popup-btn:hover::before {
    width: 300px;
    height: 300px;
}

.popup-btn-primary {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.popup-btn-primary:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.popup-btn-primary:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

.popup-btn-primary:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.popup-btn-secondary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #555;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.popup-btn-secondary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #333;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: #f0f0f0;
    color: #666;
}

/* Second popup for Other/Just browsing */
.second-popup-content {
    display: none;
}

.second-popup-content.show {
    display: block;
}

.first-popup-content.hide {
    display: none;
}

/* Professional Animations */
@keyframes overlayFadeIn {
    from { 
        opacity: 0; 
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1; 
        backdrop-filter: blur(5px);
    }
}

@keyframes popupSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-100px) scale(0.8);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gridSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes buttonsSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes selectedPulse {
    0% {
        transform: translateY(-3px) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.1);
    }
    100% {
        transform: translateY(-3px) scale(1.05);
    }
}

@keyframes pulseHover {
    0% {
        box-shadow: 0 8px 30px rgba(33, 150, 243, 0.25),
                    0 4px 15px rgba(33, 150, 243, 0.1);
    }
    100% {
        box-shadow: 0 12px 40px rgba(33, 150, 243, 0.35),
                    0 6px 20px rgba(33, 150, 243, 0.15);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .first-time-visitor-popup {
        padding: 28px 20px;
        width: 95%;
        margin: 7px;
        height: 85vh;
        max-height: 85vh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .first-time-visitor-popup h2 {
        font-size: 26px;
        margin-bottom: 14px;
        flex-shrink: 0;
    }
    
    .first-time-visitor-popup p {
        font-size: 16px;
        margin-bottom: 22px;
        line-height: 1.4;
        flex-shrink: 0;
    }
    
    .vehicle-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-bottom: 22px;
        flex: 1;
        align-content: center;
    }
    
    .vehicle-type-option {
        padding: 20px 15px;
        min-height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .vehicle-type-label {
        font-size: 16px;
        line-height: 1.3;
        font-weight: 600;
    }
    
    .popup-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
        flex-shrink: 0;
        margin-top: auto;
    }
    
    .popup-btn {
        padding: 16px 24px;
        font-size: 16px;
        min-width: 130px;
        flex: 1;
        max-width: 160px;
    }
}

@media (max-width: 480px) {
    .first-time-visitor-popup {
        padding: 22px 18px;
        margin: 6px;
        height: 85vh;
        max-height: 85vh;
    }
    
    .first-time-visitor-popup h2 {
        font-size: 24px;
        margin-bottom: 11px;
    }
    
    .first-time-visitor-popup p {
        font-size: 15px;
        margin-bottom: 17px;
        line-height: 1.3;
    }
    
    .vehicle-type-grid {
        grid-template-columns: 1fr;
        gap: 13px;
        margin-bottom: 17px;
    }
    
    .vehicle-type-option {
        min-height: 65px;
        padding: 18px 15px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .vehicle-type-label {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.2;
    }
    
    .popup-buttons {
        gap: 10px;
    }
    
    .popup-btn {
        max-width: 140px;
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Extra small screens (very small phones) */
@media (max-width: 360px) and (max-height: 640px) {
    .first-time-visitor-popup {
        padding: 19px 15px;
        margin: 3px;
        height: 85vh;
        max-height: 85vh;
    }
    
    .first-time-visitor-popup h2 {
        font-size: 20px;
        margin-bottom: 9px;
    }
    
    .first-time-visitor-popup p {
        font-size: 14px;
        margin-bottom: 14px;
        line-height: 1.2;
    }
    
    .vehicle-type-grid {
        gap: 11px;
        margin-bottom: 14px;
    }
    
    .vehicle-type-option {
        min-height: 60px;
        padding: 15px 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .vehicle-type-label {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
    }
    
    .popup-buttons {
        gap: 8px;
    }
    
    .popup-btn {
        max-width: 120px;
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Ensure no scrolling on mobile - force content to fit */
@media (max-width: 768px) {
    .first-time-visitor-overlay {
        align-items: flex-start;
        padding-top: 7.5vh;
    }
    
    .first-time-visitor-popup {
        overflow: hidden !important;
    }
}