/* ============================================
   BNPL UI - Estilos de Pantalla de Registro
   Estilo integrado al prototipo iPhone
   ============================================ */

/* Reset global para evitar overflow */
.bnpl-form * {
    box-sizing: border-box;
}

/* Secciones del formulario - Estilo tarjeta móvil */
.bnpl-section {
    margin-bottom: 1rem;
    padding: 0.85rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.bnpl-section-title {
    margin: 0 0 0.85rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: #005cb9;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bnpl-section-title i {
    font-size: 1rem;
}

/* Filas del formulario */
.bnpl-form-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Columnas responsivas para móvil - Ajustadas para evitar overflow */
.bnpl-col-4 {
    flex: 0 0 calc(33.333% - 0.334rem);
    min-width: 0;
}

.bnpl-col-6 {
    flex: 0 0 calc(50% - 0.25rem);
    min-width: 0;
}

.bnpl-col-8 {
    flex: 0 0 calc(66.666% - 0.167rem);
    min-width: 0;
}

/* Grupos de formulario */
.bnpl-form-group {
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    box-sizing: border-box;
}

.bnpl-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #333;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    line-height: 1.2;
}

.bnpl-required {
    color: #dc3545;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Inputs - Estilo iOS */
.bnpl-input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    background: #fff;
    box-sizing: border-box;
}

.bnpl-input:focus {
    outline: none;
    border-color: #005cb9;
    box-shadow: 0 0 0 2px rgba(0, 92, 185, 0.1);
}

/* Textarea */
textarea.bnpl-input {
    resize: vertical;
    min-height: 60px;
    font-family: 'Poppins', sans-serif;
}

/* Select - Estilo iOS */
select.bnpl-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 12px;
    padding-right: 2rem;
}

/* Checkboxes */
.bnpl-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #005cb9;
}

.bnpl-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
}

/* Tooltips - Simplificado para móvil */
.bnpl-tooltip {
    color: #6c757d;
    cursor: help;
    font-size: 0.85rem;
}

/* Mensajes de error */
.bnpl-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
    font-weight: 500;
}

.bnpl-error.active {
    display: block;
}

/* Botones de acción inline */
.bnpl-action-row {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bnpl-btn-secondary {
    padding: 0.6rem 1rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bnpl-btn-secondary:active {
    transform: scale(0.98);
}

.bnpl-btn-verify {
    margin-top: 0.35rem;
    padding: 0.45rem 0.7rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    justify-content: center;
    width: 100%;
}

.bnpl-btn-verify:active {
    transform: scale(0.98);
}

.bnpl-btn-verify i {
    font-size: 0.75rem;
}

/* Bloques de referencias - Estilo card móvil */
.bnpl-reference-block {
    background: #f8f9fa;
    padding: 0.85rem;
    border-radius: 0.8rem;
    margin-bottom: 0.85rem;
    border: 1px solid #e9ecef;
}

.bnpl-reference-title {
    margin: 0 0 0.65rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.bnpl-reference-title::before {
    content: '👤';
    font-size: 1rem;
}

/* Caja de consentimiento - Estilo warning card */
.bnpl-consent-box {
    background: #fff3cd;
    padding: 0.85rem;
    border-radius: 0.8rem;
    border: 2px solid #ffc107;
}

.bnpl-consent-label {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #856404;
    align-items: flex-start;
}

.bnpl-consent-label .bnpl-checkbox {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.bnpl-link {
    color: #005cb9;
    text-decoration: underline;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Resultado del Score - Estilo card destacado */
.bnpl-score-result {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.bnpl-score-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 2px solid #005cb9;
}

.bnpl-score-header {
    background: linear-gradient(135deg, #005cb9 0%, #00a9e0 100%);
    color: white;
    padding: 0.75rem 0.85rem;
    text-align: center;
}

.bnpl-score-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.bnpl-score-body {
    padding: 1rem;
}

.bnpl-score-main {
    text-align: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg,#f8f9fa,#e9ecef);
    border-radius: 0.8rem;
}

.bnpl-score-value {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #005cb9 0%, #00a9e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.bnpl-score-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
}

.bnpl-score-level {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0.35rem;
}

.bnpl-score-level.level-A {
    color: #28a745;
}

.bnpl-score-level.level-B {
    color: #17a2b8;
}

.bnpl-score-level.level-C {
    color: #ffc107;
}

.bnpl-score-level.level-D {
    color: #dc3545;
}

.bnpl-score-details {
    background: #fff;
    padding: 0;
}

.bnpl-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #e9ecef;
    gap: 0.5rem;
}

.bnpl-score-item:last-child {
    border-bottom: none;
}

.bnpl-score-item-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.bnpl-score-item-value {
    font-weight: 700;
    color: #005cb9;
    font-size: 0.95rem;
    text-align: right;
}

/* Estados de validación visual */
.bnpl-input.is-valid {
    border-color: #28a745;
}

.bnpl-input.is-invalid {
    border-color: #dc3545;
}
