/**
 * Garage Camera Widget Styles (RAF-52)
 * Dedicated camera for car photos with gallery upload
 */

/* Backdrop */
.garage-camera-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.garage-camera-backdrop.hidden {
    display: none;
}

/* Modal Container */
.garage-camera-modal {
    background: #000;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.garage-camera-modal.hidden {
    display: none;
}

/* Header */
.garage-camera-header {
    background: #1a1a1a;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(75, 196, 81, 0.2);
}

.garage-camera-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
    font-family: 'Josefin Sans', sans-serif;
}

.garage-camera-title svg {
    width: 24px;
    height: 24px;
    stroke: #4BC451;
}

.garage-camera-close {
    background: transparent;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.garage-camera-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.garage-camera-close svg {
    width: 20px;
    height: 20px;
}

/* Body (Video Container) */
.garage-camera-body {
    position: relative;
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Car Orientation Guide Overlay */
.car-guide-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 500px;
    height: auto;
    pointer-events: none;
    z-index: 5;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.car-guide-overlay.hidden {
    opacity: 0;
}

.car-guide-overlay svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(75, 196, 81, 0.8)) 
            drop-shadow(0 0 16px rgba(75, 196, 81, 0.6))
            drop-shadow(0 0 24px rgba(75, 196, 81, 0.4));
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(75, 196, 81, 0.5)) 
                drop-shadow(0 0 12px rgba(75, 196, 81, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(75, 196, 81, 0.7)) 
                drop-shadow(0 0 16px rgba(75, 196, 81, 0.5));
    }
}

/* Guide instruction text - REMOVED (no text needed, just outline) */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.garage-camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.garage-camera-canvas {
    display: none;
}

/* Gallery Upload Button (Top-right corner of video) */
.garage-gallery-upload-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(75, 196, 81, 0.9);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.garage-gallery-upload-btn:hover {
    transform: scale(1.1);
    background: rgba(75, 196, 81, 1);
    box-shadow: 0 6px 16px rgba(75, 196, 81, 0.4);
}

.garage-gallery-upload-btn svg {
    width: 24px;
    height: 24px;
}

/* Loading State */
.garage-camera-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    gap: 16px;
}

.garage-camera-loading.hidden {
    display: none;
}

.garage-camera-loading svg {
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

.garage-camera-loading svg path {
    stroke: #4BC451;
}

.garage-camera-loading h3 {
    margin: 0;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 16px;
}

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

/* Permission Denied */
.garage-camera-permission-denied {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 40px;
    text-align: center;
    gap: 16px;
}

.garage-camera-permission-denied.hidden {
    display: none;
}

.garage-camera-permission-denied svg {
    width: 64px;
    height: 64px;
    stroke: #ef4444;
}

.garage-camera-permission-denied h3 {
    margin: 0;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 18px;
}

.garage-camera-permission-denied p {
    margin: 0;
    font-size: 14px;
    color: #9ca3af;
}

/* Footer (Capture Controls) */
.garage-camera-footer {
    background: #1a1a1a;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

/* Switch Camera Button */
.garage-camera-switch-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.garage-camera-switch-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #4BC451;
}

.garage-camera-switch-btn svg {
    width: 24px;
    height: 24px;
}

/* Capture Button */
.garage-camera-capture-btn {
    background: linear-gradient(135deg, #4BC451 0%, #3da843 100%);
    border: 4px solid white;
    border-radius: 50%;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    box-shadow: 0 4px 16px rgba(75, 196, 81, 0.4);
}

.garage-camera-capture-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(75, 196, 81, 0.6);
}

.garage-camera-capture-btn:active {
    transform: scale(0.95);
}

.garage-camera-capture-btn svg {
    width: 40px;
    height: 40px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .garage-camera-modal {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .garage-gallery-upload-btn {
        width: 44px;
        height: 44px;
    }

    .garage-camera-footer {
        padding: 16px;
    }
}

