/* =====================================================
   camera-upload.css — التقاط الصور من الكاميرا
   ===================================================== */

.camera-upload-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.camera-upload-actions {
    margin-top: 0.35rem;
}

.camera-upload-thumb {
    max-width: 160px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    object-fit: cover;
}

/* Camera modal */
.cam-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.65);
}

.cam-modal.open {
    display: flex;
}

.cam-modal-dialog {
    width: min(100%, 480px);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

.cam-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.cam-modal-title {
    font-weight: 700;
    font-size: 1rem;
}

.cam-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #6c757d;
    padding: 0 0.25rem;
}

.cam-modal-body {
    position: relative;
    background: #000;
    min-height: 240px;
}

.cam-video {
    display: block;
    width: 100%;
    max-height: 60vh;
    object-fit: cover;
}

.cam-error {
    padding: 2rem 1rem;
    text-align: center;
    color: #fff;
    font-size: 0.9rem;
}

.cam-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.85rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.cam-modal-footer .btn {
    min-height: 42px;
}

@media (max-width: 575.98px) {
    .camera-upload-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
    }

    .cam-modal-footer .btn {
        flex: 1 1 auto;
    }
}
