/**
 * Estilos para el Sistema de Firma Digital de Kumano Inversiones
 */

/* Modal de Firma */
.kumano-signature-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.kumano-signature-modal.kumano-modal-show {
    opacity: 1;
    visibility: visible;
}

.kumano-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.kumano-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.kumano-modal-show .kumano-modal-content {
    transform: scale(1);
}

.kumano-modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.kumano-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.kumano-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.kumano-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.kumano-modal-body {
    padding: 25px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#kumano-signature-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

#kumano-signature-container canvas {
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.kumano-modal-footer {
    padding: 15px 25px 20px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 10px;
    justify-content: center;
    background: #f8f9fa;
}

/* Botones */
.kumano-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    gap: 8px;
}

.kumano-btn svg {
    flex-shrink: 0;
    vertical-align: middle;
    transform: translateY(-1px);
}

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

.kumano-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.kumano-btn-secondary {
    background: #6c757d;
    color: white;
}

.kumano-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.kumano-btn-cancel {
    background: #dc3545;
    color: white;
}

.kumano-btn-cancel:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .kumano-modal-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
    
    .kumano-modal-header {
        padding: 15px 20px 10px;
    }
    
    .kumano-modal-body {
        padding: 20px;
    }
    
    .kumano-modal-footer {
        padding: 10px 20px 15px;
        flex-direction: column;
    }
    
    .kumano-btn {
        margin-bottom: 5px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Estilos para el botón de firma en el formulario */
.kumano-signature-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.kumano-signature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.kumano-signature-btn:active {
    transform: translateY(0);
}

.kumano-signature-btn i {
    font-size: 16px;
}

/* Estado de firma capturada */
.kumano-signature-captured {
    background: #28a745 !important;
    color: white !important;
}

.kumano-signature-captured:hover {
    background: #218838 !important;
}

/* Preview de firma */
.kumano-signature-preview {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f8f9fa;
    text-align: center;
}

.kumano-signature-preview img {
    max-width: 200px;
    max-height: 100px;
    border: 1px solid #ddd;
    border-radius: 2px;
}

/* Loading state */
.kumano-signature-loading {
    opacity: 0.6;
    pointer-events: none;
}

.kumano-signature-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.kumano-signature-modal .kumano-modal-header {
    background: #000144 !important;
    color: #fff !important;
}

.kumano-signature-btn,
.kumano-btn-primary {
    background: #000144 !important;
    color: #fff !important;
    box-shadow: none !important;
    border: none !important;
}

.kumano-signature-btn:hover,
.kumano-btn-primary:hover {
    background: #222266 !important;
    color: #fff !important;
}

.kumano-btn-secondary {
    background: #6c757d !important;
    color: #fff !important;
}

.kumano-btn-cancel {
    background: #dc3545 !important;
    color: #fff !important;
} 