/* Modal Overlay */
.otp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal */
.otp-modal {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botón cerrar */
.otp-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.otp-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Títulos */
.otp-modal h2 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.otp-modal p {
    margin: 0 0 24px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Formulario */
.otp-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.otp-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.otp-input-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.otp-input-group input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.otp-input-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.otp-input-group input:read-only {
    background: #f5f5f5;
    color: #666;
}

/* Input de código OTP */
.otp-code-input {
    text-align: center;
    font-size: 32px !important;
    letter-spacing: 12px;
    font-weight: 600;
}

/* Mensajes de error y éxito */
.otp-error,
.otp-success {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    display: none;
}

.otp-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.otp-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

/* Botones */
.otp-btn-primary,
.otp-btn-secondary,
.otp-btn-link,
.btn-solicitar-producto {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.otp-btn-primary {
    background: #4CAF50;
    color: white;
}

.otp-btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.otp-btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.otp-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.otp-btn-secondary:hover {
    background: #e0e0e0;
}

.otp-btn-link {
    background: none;
    color: #4CAF50;
    text-decoration: underline;
    padding: 8px;
}

.otp-btn-link:hover {
    color: #45a049;
}

/* Botón solicitar producto/información */
.btn-solicitar-producto {
    background: #4CAF50;
    color: white;
    text-decoration: none;
}

.btn-solicitar-producto:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-solicitar-producto:active {
    transform: translateY(0);
}

/* Spinner de carga */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Texto de ayuda en formularios */
.otp-input-group small.texto-ayuda {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Botón secundario */
.otp-btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.otp-btn-secondary:hover {
    background: #5a6268;
}

/* Responsive */
@media (max-width: 600px) {
    .otp-modal {
        padding: 24px;
        width: 95%;
    }
    
    .otp-modal h2 {
        font-size: 20px;
    }
    
    .otp-code-input {
        font-size: 24px !important;
        letter-spacing: 8px;
    }
}