﻿/* ====================================
   WIZARD REGISTRO LLAVEROS QR
   Diseño moderno y responsive
   ==================================== */

/* ========================================
   VARIABLES CSS PERSONALIZADAS
======================================== */
:root {
    --wizard-primary: #1B4B8C;
    --wizard-secondary: #7CB342;
    --wizard-success: #45B7D1;
    --wizard-warning: #FFA726;
    --wizard-danger: #EF5350;
    --wizard-gray-light: #F8F9FA;
    --wizard-gray-medium: #E9ECEF;
    --wizard-gray-dark: #6C757D;
    --wizard-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --wizard-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --wizard-border-radius: 12px;
    --wizard-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   INDICADOR DE PROGRESO MODERNO
======================================== */
.progress-indicator {
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.progress-bar {
    height: 4px;
    background: var(--wizard-gray-medium);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    margin-bottom: -20px;
    margin-left: 5px;
    width: 290px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wizard-primary) 0%, var(--wizard-secondary) 100%);
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

    .progress-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        animation: shimmer 2s infinite;
    }

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--wizard-transition);
}

    .progress-step.completed {
        cursor: pointer;
    }

    .progress-step:not(.completed):not(.active) {
        cursor: default;
    }

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--wizard-gray-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--wizard-gray-dark);
    transition: var(--wizard-transition);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-text {
    font-size: 0.85rem;
    color: var(--wizard-gray-dark);
    font-weight: 500;
    opacity: 0.7;
    transition: var(--wizard-transition);
    text-align: center;
}

/* Estados del progreso */
.progress-step.active .step-circle {
    background: var(--wizard-primary);
    border-color: var(--wizard-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.2);
}

.progress-step.active .step-text {
    color: var(--wizard-primary);
    opacity: 1;
    font-weight: 600;
}

.progress-step.completed .step-circle {
    background: var(--wizard-success);
    border-color: var(--wizard-success);
    color: white;
}

.progress-step.completed .step-text {
    color: var(--wizard-success);
    opacity: 1;
    font-weight: 600;
}

.progress-step.completed:hover .step-circle {
    transform: scale(1.05);
}

/* ========================================
   PASOS DEL WIZARD
======================================== */
.wizard-step {
    display: none;
    min-height: 400px;
    opacity: 0;
    transform: translateX(20px);
    transition: var(--wizard-transition);
}

    .wizard-step.active {
        display: block;
        opacity: 1;
        transform: translateX(0);
        animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .wizard-step.step-exit {
        animation: slideOutLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .wizard-step.step-exit-reverse {
        animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .wizard-step.shake-error {
        animation: shake 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* ========================================
   HEADERS DE PASOS
======================================== */
.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cocrianza-coral-suave), var(--cocrianza-verde-salvia));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--wizard-shadow);
}

    .step-icon i {
        font-size: 1.5rem;
        color: white;
    }

.step-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cocrianza-gris-calido, #333);
    margin-bottom: 0.5rem;
}

/* ========================================
   OPCIONES DE REGISTRO (PASO 1)
======================================== */
.register-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.register-option {
    position: relative;
}

    .register-option.recommended::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(135deg, var(--wizard-primary), var(--wizard-secondary));
        border-radius: var(--wizard-border-radius);
        z-index: 0;
    }

.option-badge {
    position: absolute;
    top: -8px;
    right: 20px;
    background: var(--wizard-success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 3;
    box-shadow: var(--wizard-shadow);
}

.option-button {
    width: 100%;
    background: white;
    border: 2px solid var(--wizard-gray-medium);
    border-radius: var(--wizard-border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--wizard-transition);
    text-align: left;
    position: relative;
    z-index: 1;
}

    .option-button:hover,
    .option-button.hover-effect {
        border-color: var(--wizard-primary);
        transform: translateY(-2px);
        box-shadow: var(--wizard-shadow-hover);
    }

    .option-button.selected-option {
        border-color: var(--wizard-success);
        background: rgba(69, 183, 209, 0.05);
        transform: scale(0.98);
    }

.option-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--wizard-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-button:hover .option-icon,
.option-button.hover-effect .option-icon {
    background: var(--wizard-primary);
    color: white;
}

.option-button.selected-option .option-icon {
    background: var(--wizard-success);
    color: white;
}

.option-icon i {
    font-size: 1.2rem;
    transition: var(--wizard-transition);
}

.option-content {
    flex: 1;
}

.option-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.option-description {
    font-size: 0.9rem;
    color: var(--wizard-gray-dark);
    margin: 0;
    line-height: 1.4;
}

.option-arrow {
    color: var(--wizard-gray-dark);
    transition: var(--wizard-transition);
}

.option-button:hover .option-arrow,
.option-button.hover-effect .option-arrow {
    color: var(--wizard-primary);
    transform: translateX(5px);
}

.options-divider {
    text-align: center;
    margin: 1rem 0;
    position: relative;
}

    .options-divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--wizard-gray-medium);
        z-index: 1;
    }

    .options-divider span {
        background: white;
        padding: 0 1rem;
        color: var(--wizard-gray-dark);
        font-size: 0.9rem;
        position: relative;
        z-index: 2;
    }

/* ========================================
   FORMULARIO (PASO 2)
======================================== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

    .form-label i {
        color: var(--wizard-primary);
    }

.modern-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--wizard-gray-medium);
    border-radius: var(--wizard-border-radius);
    font-size: 1rem;
    transition: var(--wizard-transition);
    background: white;
}

    .modern-input:focus {
        outline: none;
        border-color: var(--wizard-primary);
        box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
    }

    .modern-input.is-invalid {
        border-color: var(--wizard-danger);
        animation: inputError 0.3s ease;
    }

        .modern-input.is-invalid:focus {
            box-shadow: 0 0 0 3px rgba(239, 83, 80, 0.1);
        }

@keyframes inputError {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ========================================
   CONTRASEÑAS
======================================== */
.password-input-wrapper {
    position: relative;
}

    .password-input-wrapper .modern-input {
        padding-right: 3rem;
    }

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--wizard-gray-dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--wizard-transition);
}

    .password-toggle:hover {
        color: var(--wizard-primary);
    }

.password-strength {
    margin-top: 0.5rem;
    display: none;
}

.strength-bar {
    height: 4px;
    background: var(--wizard-gray-medium);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.password-strength.weak .strength-fill {
    background: var(--wizard-danger);
}

.password-strength.medium .strength-fill {
    background: var(--wizard-warning);
}

.password-strength.strong .strength-fill {
    background: var(--wizard-success);
}

.strength-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.password-strength.weak .strength-text {
    color: var(--wizard-danger);
}

.password-strength.medium .strength-text {
    color: var(--wizard-warning);
}

.password-strength.strong .strength-text {
    color: var(--wizard-success);
}

/* ========================================
   PASO FINAL (PASO 3)
======================================== */
.final-step-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.benefits-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--wizard-border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--wizard-gray-medium);
}

.benefits-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: var(--wizard-transition);
}

    .benefit-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--wizard-shadow);
    }

    .benefit-item i {
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .benefit-item span {
        font-size: 0.9rem;
        font-weight: 500;
        color: #333;
    }

.terms-section {
    text-align: left;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--wizard-border-radius);
    border: 2px solid var(--wizard-gray-medium);
}

.form-check {
    margin-bottom: 1rem;
}

    .form-check:last-child {
        margin-bottom: 0;
    }

.form-check-input {
    margin-right: 0.5rem;
}

.form-check-label {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
}

.terms-link {
    color: var(--wizard-primary);
    text-decoration: none;
    font-weight: 500;
}

    .terms-link:hover {
        text-decoration: underline;
    }

.final-submit-btn {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--wizard-border-radius);
    background: linear-gradient(135deg, var(--cocrianza-coral-suave), var(--cocrianza-verde-salvia));
    border: none;
    color: white;
    box-shadow: var(--wizard-shadow);
    transition: var(--wizard-transition);
    position: relative;
    overflow: hidden;
}

    .final-submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--wizard-shadow-hover);
    }

    .final-submit-btn:active {
        transform: translateY(0);
    }

    .final-submit-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }

    .final-submit-btn:hover::before {
        left: 100%;
    }

/* ========================================
   NAVEGACIÓN DEL WIZARD
======================================== */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--wizard-gray-medium);
}

    .wizard-navigation .btn {
        padding: 0.75rem 1.5rem;
        border-radius: var(--wizard-border-radius);
        font-weight: 600;
        transition: var(--wizard-transition);
    }

    .wizard-navigation .btn-outline-secondary {
        border-color: var(--wizard-gray-medium);
        color: var(--wizard-gray-dark);
    }

        .wizard-navigation .btn-outline-secondary:hover {
            background: var(--wizard-gray-dark);
            border-color: var(--wizard-gray-dark);
            color: white;
        }

    .wizard-navigation .btn-cocrianza-secondary {
        background: var(--cocrianza-coral-suave);
        border-color: var(--wizard-secondary);
        color: white;
    }

        .wizard-navigation .btn-cocrianza-secondary:hover {
            background: var(--cocrianza-coral-suave);
            border-color: #45b5ac;
            transform: translateY(-1px);
        }

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 768px) {
    .progress-indicator {
        padding: 0 0.5rem;
    }

    .progress-steps {
        gap: 0.5rem;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .step-text {
        font-size: 0.75rem;
    }

    .wizard-step {
        min-height: 350px;
    }

    .step-icon {
        width: 50px;
        height: 50px;
    }

        .step-icon i {
            font-size: 1.25rem;
        }

    .option-button {
        padding: 1.25rem;
    }

    .option-icon {
        width: 45px;
        height: 45px;
    }

    .option-title {
        font-size: 1rem;
    }

    .option-description {
        font-size: 0.85rem;
    }

    .form-grid {
        gap: 1.25rem;
    }

    .benefits-list {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .wizard-navigation {
        flex-direction: column;
        gap: 1rem;
    }

        .wizard-navigation .btn {
            width: 100%;
        }
}

@media (max-width: 480px) {
    .register-options {
        gap: 0.75rem;
    }

    .option-button {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .option-content {
        text-align: center;
    }

    .option-arrow {
        display: none;
    }

    .benefits-preview {
        padding: 1.5rem;
    }

    .terms-section {
        padding: 1rem;
    }

    .final-submit-btn {
        width: 100%;
    }
}

/* ========================================
   ACCESIBILIDAD
======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible para navegación por teclado */
.option-button:focus,
.progress-step:focus,
.modern-input:focus,
.password-toggle:focus,
.final-submit-btn:focus {
    outline: 2px solid var(--wizard-primary);
    outline-offset: 2px;
}

/* Estados de carga */
.btn-loading {
    position: relative;
    color: transparent !important;
}

    .btn-loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        margin: -10px 0 0 -10px;
        width: 20px;
        height: 20px;
        border: 2px solid transparent;
        border-top-color: currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   UTILIDADES ESPECÍFICAS
======================================== */
.text-cocrianza-coral {
    color: var(--wizard-primary) !important;
}

.text-cocrianza-turquesa {
    color: var(--wizard-secondary) !important;
}

.text-cocrianza-verde {
    color: var(--wizard-success) !important;
}

.bg-cocrianza-coral {
    background-color: var(--wizard-primary) !important;
}

.bg-cocrianza-turquesa {
    background-color: var(--wizard-secondary) !important;
}

.bg-cocrianza-verde {
    background-color: var(--wizard-success) !important;
}
