/* Estilos para el Sistema de Captura de Documentos */

.camera-modal {
    display: block;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.camera-modal-content {
    background-color: #1a1a1a;
    margin: 2% auto;
    width: 95%;
    max-width: 800px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.camera-header {
    background: #393939;
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.camera-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.camera-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
}

.camera-close:hover {
    opacity: 0.7;
}

.camera-body {
    padding: 1.5rem;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

#cameraVideo {
    width: 100%;
    height: auto;
    display: block;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.camera-frame {
    position: absolute;
    top: 15%;
    left: 10%;
    right: 10%;
    bottom: 15%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 4px solid #00ff00;
}

.corner.top-left {
    top: 15%;
    left: 10%;
    border-right: none;
    border-bottom: none;
    border-radius: 10px 0 0 0;
}

.corner.top-right {
    top: 15%;
    right: 10%;
    border-left: none;
    border-bottom: none;
    border-radius: 0 10px 0 0;
}

.corner.bottom-left {
    bottom: 15%;
    left: 10%;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 10px;
}

.corner.bottom-right {
    bottom: 15%;
    right: 10%;
    border-left: none;
    border-top: none;
    border-radius: 0 0 10px 0;
}

.quality-indicators {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    justify-content: space-around;
}

.indicator {
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 100px;
    backdrop-filter: blur(5px);
}

.indicator i {
    font-size: 1.2rem;
    color: #999;
}

.indicator span {
    font-size: 0.75rem;
    color: white;
}

.indicator.good i {
    color: #00ff00;
}

.indicator.warning i {
    color: #ffaa00;
}

.indicator.bad i {
    color: #ff0000;
}

.indicator .status {
    font-weight: bold;
    font-size: 0.7rem;
}

.camera-instructions {
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    color: white;
}

.camera-instructions p {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: bold;
    color: #00ff00;
}

.camera-instructions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.camera-instructions li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #ccc;
}

.photo-counter {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    margin: 1rem 0;
    font-weight: bold;
}

.photo-counter #photoCount {
    color: #00ff00;
    font-size: 1.5rem;
}

.camera-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-capture,
.btn-finish {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-capture {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-capture:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

.btn-capture:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-finish {
    background: #00ff00;
    color: #000;
}

.btn-finish:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 255, 0, 0.5);
}

.captured-preview {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-item {
    position: relative;
    width: 150px;
    border: 3px solid #00ff00;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.preview-item img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-item span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 255, 0, 0.9);
    color: #000;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.camera-btn-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #393939;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 0.5rem;
    transition: all 0.3s;
}

.camera-btn-trigger:hover {
    background: #4d4d4d;
    transform: translateY(-2px);
}

.camera-btn-trigger i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .camera-modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        height: 100vh;
    }

    .quality-indicators {
        flex-direction: column;
        gap: 5px;
    }

    .indicator {
        flex-direction: row;
        justify-content: space-between;
        min-width: auto;
        width: 100%;
    }

    .camera-actions {
        flex-direction: column;
    }

    .btn-capture,
    .btn-finish {
        width: 100%;
        justify-content: center;
    }
}
