/* Vehicle Gallery Styles */
.vehicle-gallery-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000 !important;
    z-index: 2000;
    isolation: isolate;
}

.vehicle-gallery-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 100%;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery Navigation */
.gallery-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 90;
    pointer-events: none; /* This allows clicks to pass through to elements below */
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: #00000080;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: background 0.3s ease;
    pointer-events: auto;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Gallery Dots */
.gallery-dots {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Gallery Actions */
.gallery-actions {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.gallery-actions button, 
.gallery-actions a {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Gallery-specific styling - applies only to buttons in the gallery */
.gallery-actions .back-to-fleet, 
.gallery-actions .view-details {
    background: #00000080;
    color: white;
}

.gallery-actions .back-to-fleet:hover, 
.gallery-actions .view-details:hover {
    background: rgba(0, 0, 0, 0.7);
}

.book-now, .notify-me {
    background: var(--primary-color, #ff4d30);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.book-now:hover, .notify-me:hover {
    background: #d63a1f;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(255, 77, 48, 0.3);
}

.get-notified {
    background: var(--primary-color, #ff4d30);
    color: white;
}

.get-notified:hover {
    background: #d63a1f;
}

/* Notification Modal Content Container - matching legal-modal styling */
.notification-content-container {
    padding: 20px;
    width: 100%;
}

.notification-content-container h2 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #333;
}

.notification-form {
    margin-top: 0;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    height: 48px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    appearance: checkbox;
}

.checkbox-group label {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-weight: normal;
    display: inline-block;
    font-size: 16px;
    color: #333;
}

span.required {
    color: #e63946;
    margin-left: 3px;
}

span.optional {
    color: #777;
    font-size: 0.85em;
    font-weight: normal;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color, #ff4d30);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 48px;
    margin-bottom: 20px;
}

.submit-btn:hover {
    background: #ff3517;
}

/* Success/Error Messages */
.success-message,
.error-message {
    text-align: center;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
    display: none;
}

.success-message.active,
.error-message.active {
    display: block !important;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
}

.error-message {
    background: #ffebee;
    color: #c62828;
}

.success-message i {
    font-size: 48px;
    margin-bottom: 10px;
    color: #4CAF50;
}

/* Mobile responsiveness for modals */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
    }
    
    .notification-content-container h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 15px;
    }
    
    .notification-content-container h2 {
        font-size: 18px;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }
}

/* Modals */
.vehicle-details-modal,
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 2100;
}

/* Active state for both modals */
.vehicle-details-modal.active,
.notification-modal.active {
    display: flex;
}

/* Modal content base styles */
.modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px 8px 0 0;
    padding: 30px;
}

/* When modal is active, slide up the content */
.vehicle-details-modal.active .modal-content,
.notification-modal.active .modal-content {
    /* No transform needed */
}

/* Close button styling for all modals */
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2110;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    background-image: url('../images/ff_close.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100%;
    border: none;
    color: transparent;
}

.close-modal:hover {
    background-color: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg) scale(1.1);
}

/* Notification Form */
.notification-form {
    margin-top: 0;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    height: 48px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    height: 40px;
    text-align: left;
    width: 100%;
    margin-bottom: 30px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    appearance: checkbox;
}

.checkbox-group label {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-weight: normal;
    display: inline-block;
    font-size: 16px;
    color: #333;
}

span.required {
    color: #e63946;
    margin-left: 3px;
}

span.optional {
    color: #777;
    font-size: 0.85em;
    font-weight: normal;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color, #ff4d30);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 48px;
}

.submit-btn:hover {
    background: #ff3517;
}

/* Vehicle Details Content */
.vehicle-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.spec-group h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid var(--primary-color, #ff4d30);
    padding-bottom: 8px;
}

.spec-group ul {
    list-style: none;
    padding: 0;
}

.spec-group li {
    margin-bottom: 10px;
    color: #666;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* Loading and Error States */
.loading-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
    margin: 2rem auto;
}

.error-state {
    background-color: #ffeaea;
    border-radius: 8px;
    max-width: 600px;
}

.error-state h1 {
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-state .btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.error-state .btn:hover {
    background-color: #c0392b;
}

.spinner {
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 5px solid var(--primary-color);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility classes for showing/hiding elements */
.hidden {
    display: none !important;
}

.active {
    display: block !important;
}

/* Floating close button for vehicle detail pages */
.vehicle-detail-page .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1110;
    background-image: url('../images/ff_close.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100%;
    /* Apply filter to make the SVG visible on dark background */
    filter: brightness(1.5);
}

.vehicle-detail-page .close-modal:hover {
    background-color: var(--primary-color, #ff4d30);
    transform: rotate(90deg);
}

/* Z-index hierarchy and modal fixes */
.vehicle-detail-page {
    background-color: black;
    position: relative;
    z-index: 1;
}

.vehicle-detail-page .vehicle-gallery-wrapper {
    z-index: 2000;
    background: #000;
}

.vehicle-detail-page .vehicle-details-modal,
.vehicle-detail-page .notification-modal {
    z-index: 2100;
    transition: opacity 0.3s ease-out;
}

.vehicle-detail-page .close-modal {
    z-index: 2110;
    position: absolute;
    top: 8px;
    right: 15px;
}

.vehicle-detail-page .modal-content {
    transform: translateY(0);
    transition: transform 0.3s ease-out;
}

/* Navigation Hints */
.navigation-hint {
    position: absolute;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 95;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none; /* Don't interfere with gallery interaction */
}

.navigation-hint span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.navigation-hint i {
    font-size: 16px;
}

/* Keyboard hint at the bottom */
.keyboard-hint {
    bottom: 160px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    animation: fadeInOut 4s ease-in-out 1s forwards;
}

/* Swipe hint in the middle */
.swipe-hint {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(10px);
    animation: fadeInOut 4s ease-in-out forwards;
}

/* Fade in-out animation */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) translateY(10px); }
    20% { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
    80% { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
    100% { opacity: 0; transform: translate(-50%, -50%) translateY(-10px); }
}

/* Adjust position for keyboard hint */
@keyframes fadeInOutKeyboard {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Apply the correct animation to keyboard hint */
.keyboard-hint {
    animation: fadeInOutKeyboard 4s ease-in-out 1s forwards;
}

/* Ensure the hints aren't shown on mobile devices (for keyboard hint) and desktop (for swipe hint) */
@media (max-width: 768px) {
    .keyboard-hint {
        display: none;
    }
}

@media (min-width: 769px) {
    .swipe-hint {
        display: none;
    }
}

/* Mobile adaptations for gallery actions */
@media (max-width: 576px) {
    .gallery-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 0px 4px 16px 4px;
        z-index: 1000;
        gap: 8px;
    }
    
    .gallery-actions button, 
    .gallery-actions a {
        padding: 16px 4px;
        width: 100%;
        font-size: 12px;
    }
    
    .book-now,
    .notify-me {
        font-size: 12px;
    }
} 