/* ========================================
   WEBCAM CAPTURE MODAL STYLES
   ======================================== */

/* Modal Container */
.modal--webcam-capture {
    max-width: 900px !important;
    width: 90% !important;
    max-height: 90vh !important;
    border-radius: 16px !important;
    overflow: hidden !important;
}

.modal--webcam-capture .modal-content {
    padding: 0 !important;
}

/* Modal Header */
.webcam-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.webcam-modal-header h5 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.webcam-modal-header .modal-close {
    min-width: auto !important;
    padding: 8px !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #666 !important;
    transition: all 0.2s ease;
}

.webcam-modal-header .modal-close:hover {
    background: #f5f5f5 !important;
    color: #333 !important;
    border-radius: 50%;
}

.webcam-modal-header .modal-close svg {
    display: block;
}

/* Webcam Capture Section */
.webcam_capture_modal_section {
    padding: 24px;
    background: #fafafa;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Permission/Error Boxes */
.webcam-permission-box,
.webcam-error-box {
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.webcam-icon {
    margin-bottom: 20px;
}

.webcam-icon.error svg {
    color: #dc0c3e !important;
}

.webcam-permission-box h6,
.webcam-error-box h6 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.webcam-permission-box p,
.webcam-error-box p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 24px;
}

.webcam-permission-box .btn,
.webcam-error-box .btn {
    min-width: 200px;
}

/* Video Container */
.webcam-preview-box {
    width: 100%;
    max-width: 100%;
}

.webcam-video-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    height: 480px;
    margin: 0 auto;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.webcam-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Captured Photo Container */
.webcam-captured-box {
    width: 100%;
    max-width: 100%;
}

.captured-photo-container {
    position: relative;
    width: 100%;
    max-width: 710px;
    margin: 0 auto;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.captured-photo-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* Webcam Controls */
.webcam-controls {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.webcam-controls .btn {
    min-width: 160px;
}

/* Face Guide Overlay */
.webcam-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.webcam-guide-circle {
    width: 320px;
    height: 320px;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
}

/* Camera Controls Overlay */
.camera-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.camera-controls-overlay button {
    pointer-events: auto;
}

/* Top Bar - Zoom Level Badge */
.camera-top-bar {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

.zoom-level-badge {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Side Bar - Desktop Zoom Controls */
.camera-side-bar {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 8px;
    border-radius: 24px;
}

.camera-zoom-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.camera-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

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

.zoom-slider-container {
    height: 120px;
    width: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.zoom-slider-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.zoom-slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, #6b669c, #9c96d4);
    border-radius: 2px;
    transition: height 0.2s ease;
}

/* Bottom Bar - Mobile Zoom Controls */
.camera-bottom-bar {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 24px;
}

.camera-zoom-btn-mobile {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.camera-zoom-btn-mobile:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.camera-zoom-btn-mobile:active {
    transform: scale(0.95);
}

.zoom-level-mobile {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Mobile Devices */
@media (max-width: 768px) {
    .modal--webcam-capture {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .webcam-modal-header {
        padding: 16px 20px;
    }

    .webcam_capture_modal_section {
        padding: 16px;
        min-height: calc(100vh - 80px);
    }

    .webcam-video-container {
        max-width: 100%;
        height: calc(100vh - 200px);
        border-radius: 12px;
    }

    .webcam-guide-circle {
        width: 280px;
        height: 280px;
    }

    /* Hide side bar, show bottom bar on mobile */
    .camera-side-bar {
        display: none !important;
    }

    .camera-bottom-bar {
        display: flex !important;
    }

    .webcam-controls {
        margin-top: 16px;
        gap: 10px;
    }

    .webcam-controls .btn {
        min-width: 140px;
        font-size: 15px;
        padding: 12px 20px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .webcam-video-container {
        max-width: 800px;
        height: 600px;
    }

    .webcam-guide-circle {
        width: 360px;
        height: 360px;
    }
}

