/* ==========================================================================
   WASTELENS LIVE CAMERA MODAL STYLES
   ========================================================================== */

.camera-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.camera-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.camera-modal-dialog {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    max-width: 680px;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.camera-modal-overlay.active .camera-modal-dialog {
    transform: scale(1) translateY(0);
}

/* Header */
.camera-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.camera-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.camera-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.35);
    font-size: 0.75rem;
    font-weight: 700;
    color: #34d399;
    letter-spacing: 0.06em;
}

.camera-live-badge .live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: livePulse 1.8s infinite ease-in-out;
}

@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.camera-modal-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-camera-action,
.btn-camera-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.2s ease;
}

.btn-camera-action:hover,
.btn-camera-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.06);
}

/* Viewfinder Area */
.camera-viewfinder-wrapper {
    position: relative;
    width: 100%;
    background: #000000;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    max-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#camera-video-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #090d16;
}

/* Reticle & Focus Corner Brackets */
.camera-reticle {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.reticle-corner {
    position: absolute;
    width: 36px;
    height: 36px;
    border-color: #10b981;
    border-style: solid;
    border-width: 0;
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.5));
}

.reticle-corner.tl {
    top: 24px;
    left: 24px;
    border-top-width: 3px;
    border-left-width: 3px;
    border-top-left-radius: 10px;
}

.reticle-corner.tr {
    top: 24px;
    right: 24px;
    border-top-width: 3px;
    border-right-width: 3px;
    border-top-right-radius: 10px;
}

.reticle-corner.bl {
    bottom: 24px;
    left: 24px;
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-bottom-left-radius: 10px;
}

.reticle-corner.br {
    bottom: 24px;
    right: 24px;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-bottom-right-radius: 10px;
}

.reticle-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f1f5f9;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.reticle-hint i {
    color: #34d399;
    font-size: 1rem;
}

/* Flash Animation */
.camera-flash {
    position: absolute;
    inset: 0;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
    z-index: 10;
}

.camera-flash.flashing {
    opacity: 0.9;
    transition: none;
}

/* Error Overlay */
.camera-error-overlay {
    position: absolute;
    inset: 0;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    text-align: center;
    color: #ffffff;
    z-index: 20;
}

.camera-error-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
}

.camera-error-overlay h4 {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f87171;
}

.camera-error-overlay p {
    margin: 0 0 20px 0;
    font-size: 0.875rem;
    color: #cbd5e1;
    max-width: 440px;
    line-height: 1.5;
}

.camera-error-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.camera-error-buttons .btn-primary {
    background: var(--primary, #10b981);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.camera-error-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Footer / Shutter */
.camera-modal-footer {
    padding: 16px 24px;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.camera-footer-spacer {
    flex: 1;
}

.shutter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.camera-footer-side-action {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.shutter-button {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: transparent;
    border: 3.5px solid #ffffff;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.shutter-button:hover {
    transform: scale(1.06);
}

.shutter-button:active {
    transform: scale(0.92);
}

.shutter-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background-color 0.2s ease;
}

.shutter-button:hover .shutter-inner {
    background: #059669;
}

.shutter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.btn-camera-footer-cancel {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.btn-camera-footer-cancel:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
    .camera-modal-dialog {
        border-radius: 16px;
        max-width: 100%;
    }
    .camera-viewfinder-wrapper {
        aspect-ratio: 1 / 1;
    }
    .camera-modal-footer {
        padding: 14px 16px;
    }
    .shutter-button {
        width: 60px;
        height: 60px;
    }
    .btn-camera-footer-upload {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}
