/* ========================================
   WORLD-CLASS REGISTRATION WIZARD STYLES
   ======================================== */

/* Root Variables */
:root {
    --wizard-primary: #4f46e5;
    --wizard-primary-light: #818cf8;
    --wizard-primary-dark: #3730a3;
    --wizard-success: #10b981;
    --wizard-warning: #f59e0b;
    --wizard-danger: #ef4444;
    --wizard-gray-50: #f9fafb;
    --wizard-gray-100: #f3f4f6;
    --wizard-gray-200: #e5e7eb;
    --wizard-gray-300: #d1d5db;
    --wizard-gray-400: #9ca3af;
    --wizard-gray-500: #6b7280;
    --wizard-gray-600: #4b5563;
    --wizard-gray-700: #374151;
    --wizard-gray-800: #1f2937;
    --wizard-gray-900: #111827;
    --wizard-border-radius: 16px;
    --wizard-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.registration-wizard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.registration-wizard-card {
    background: white;
    border-radius: var(--wizard-border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.wizard-header {
    background: linear-gradient(135deg, var(--wizard-primary) 0%, var(--wizard-primary-dark) 100%);
    padding: 2rem;
    text-align: center;
    color: white;
}

.wizard-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
}

.wizard-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.wizard-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Progress Stepper */
.wizard-progress-container {
    padding: 2rem;
    background: var(--wizard-gray-50);
    border-bottom: 1px solid var(--wizard-gray-200);
}

.wizard-stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.wizard-step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--wizard-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--wizard-gray-400);
    transition: var(--wizard-transition);
    position: relative;
}

.wizard-step-circle i {
    font-size: 1.25rem;
}

.wizard-step.active .wizard-step-circle {
    border-color: var(--wizard-primary);
    background: var(--wizard-primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.wizard-step.completed .wizard-step-circle {
    border-color: var(--wizard-success);
    background: var(--wizard-success);
    color: white;
}

.wizard-step-label {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--wizard-gray-400);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--wizard-transition);
}

.wizard-step.active .wizard-step-label,
.wizard-step.completed .wizard-step-label {
    color: var(--wizard-gray-700);
}

/* Progress Line */
.wizard-progress-line {
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--wizard-gray-200);
    z-index: 1;
}

.wizard-progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wizard-success), var(--wizard-primary));
    transition: width 0.5s ease;
    border-radius: 3px;
}

/* Form Body */
.wizard-body {
    padding: 2rem;
}

.wizard-step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.wizard-step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    margin-bottom: 2rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wizard-gray-800);
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--wizard-gray-500);
    font-size: 0.95rem;
}

/* Form Groups */
.wizard-form-group {
    margin-bottom: 1.5rem;
}

.wizard-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .wizard-form-row {
        grid-template-columns: 1fr;
    }
}

.wizard-label {
    display: block;
    font-weight: 600;
    color: var(--wizard-gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.wizard-label .required-star {
    color: var(--wizard-danger);
    margin-left: 2px;
}

.wizard-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--wizard-gray-200);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--wizard-transition);
    background: white;
}

.wizard-input:focus {
    outline: none;
    border-color: var(--wizard-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.wizard-input.is-valid {
    border-color: var(--wizard-success);
}

.wizard-input.is-invalid {
    border-color: var(--wizard-danger);
}

.wizard-input::placeholder {
    color: var(--wizard-gray-400);
}

/* Password Strength */
.password-strength-container {
    margin-top: 0.75rem;
}

.password-strength-bar {
    height: 6px;
    background: var(--wizard-gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.password-strength-fill {
    height: 100%;
    width: 0;
    transition: var(--wizard-transition);
    border-radius: 3px;
}

.password-strength-fill.strength-weak {
    width: 25%;
    background: var(--wizard-danger);
}

.password-strength-fill.strength-fair {
    width: 50%;
    background: var(--wizard-warning);
}

.password-strength-fill.strength-good {
    width: 75%;
    background: #84cc16;
}

.password-strength-fill.strength-strong {
    width: 100%;
    background: var(--wizard-success);
}

.password-strength-text {
    font-size: 0.75rem;
    font-weight: 500;
}

.password-requirements {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--wizard-gray-50);
    border-radius: 8px;
}

.password-requirements-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--wizard-gray-600);
    margin-bottom: 0.5rem;
}

.password-requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--wizard-gray-500);
    margin-bottom: 0.25rem;
}

.password-requirement i {
    font-size: 0.875rem;
}

.password-requirement.met {
    color: var(--wizard-success);
}

.password-requirement.met i::before {
    content: "\F26E"; /* check-circle-fill */
}

/* Input Icons */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .wizard-input {
    padding-left: 2.75rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wizard-gray-400);
    font-size: 1.1rem;
    pointer-events: none;
}

.input-icon-wrapper .wizard-input:focus + .input-icon,
.input-icon-wrapper .wizard-input:not(:placeholder-shown) + .input-icon {
    color: var(--wizard-primary);
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--wizard-gray-400);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.1rem;
    transition: var(--wizard-transition);
}

.toggle-password:hover {
    color: var(--wizard-gray-600);
}

/* Validation Messages */
.validation-message {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.validation-message.error {
    color: var(--wizard-danger);
}

.validation-message.success {
    color: var(--wizard-success);
}

/* Info Box */
.info-box {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    margin-top: 1rem;
}

.info-box-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #3b82f6;
}

.info-box-content {
    font-size: 0.875rem;
    color: #1e40af;
}

.info-box-content strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--wizard-gray-400);
    font-size: 0.875rem;
    font-weight: 500;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--wizard-gray-200);
}

/* Buttons */
.wizard-footer {
    padding: 1.5rem 2rem;
    background: var(--wizard-gray-50);
    border-top: 1px solid var(--wizard-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.wizard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--wizard-transition);
    border: none;
}

.wizard-btn-secondary {
    background: white;
    color: var(--wizard-gray-700);
    border: 2px solid var(--wizard-gray-300);
}

.wizard-btn-secondary:hover {
    background: var(--wizard-gray-50);
    border-color: var(--wizard-gray-400);
}

.wizard-btn-primary {
    background: linear-gradient(135deg, var(--wizard-primary) 0%, var(--wizard-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.wizard-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

.wizard-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wizard-btn-success {
    background: linear-gradient(135deg, var(--wizard-success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.wizard-btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Save Progress Button */
.save-progress-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--wizard-gray-300);
    border-radius: 8px;
    color: var(--wizard-gray-600);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--wizard-transition);
}

.save-progress-btn:hover {
    background: white;
    border-color: var(--wizard-primary);
    color: var(--wizard-primary);
}

.save-progress-btn.saved {
    color: var(--wizard-success);
    border-color: var(--wizard-success);
}

/* Checkbox / Radio Custom */
.wizard-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.wizard-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--wizard-gray-300);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: var(--wizard-transition);
    flex-shrink: 0;
    margin-top: 2px;
}

.wizard-checkbox:checked {
    background: var(--wizard-primary);
    border-color: var(--wizard-primary);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
}

.wizard-checkbox-label {
    font-size: 0.9rem;
    color: var(--wizard-gray-700);
}

.wizard-checkbox-label a {
    color: var(--wizard-primary);
    text-decoration: none;
}

.wizard-checkbox-label a:hover {
    text-decoration: underline;
}

/* Summary Card */
.summary-card {
    background: var(--wizard-gray-50);
    border: 1px solid var(--wizard-gray-200);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.summary-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--wizard-gray-200);
}

.summary-card-title {
    font-weight: 600;
    color: var(--wizard-gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-card-edit {
    color: var(--wizard-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--wizard-transition);
}

.summary-card-edit:hover {
    text-decoration: underline;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.summary-item-label {
    color: var(--wizard-gray-500);
    font-size: 0.875rem;
}

.summary-item-value {
    color: var(--wizard-gray-800);
    font-weight: 500;
    font-size: 0.875rem;
    text-align: right;
}

/* Loading Spinner */
.wizard-btn .spinner {
    width: 20px;
    height: 20px;
    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);
    }
}

/* Alert Messages */
.wizard-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.wizard-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.wizard-alert-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.wizard-alert-content {
    flex: 1;
}

.wizard-alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.wizard-alert-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
}

/* Province Select Styling */
.wizard-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--wizard-gray-200);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--wizard-transition);
    background: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    cursor: pointer;
}

.wizard-select:focus {
    outline: none;
    border-color: var(--wizard-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .registration-wizard-container {
        padding: 1rem 0.5rem;
    }

    .wizard-header {
        padding: 1.5rem 1rem;
    }

    .wizard-title {
        font-size: 1.5rem;
    }

    .wizard-progress-container {
        padding: 1.5rem 1rem;
        overflow-x: auto;
    }

    .wizard-step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .wizard-step-label {
        font-size: 0.65rem;
    }

    .wizard-body {
        padding: 1.5rem 1rem;
    }

    .step-title {
        font-size: 1.25rem;
    }

    .wizard-footer {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .wizard-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .wizard-footer,
    .wizard-progress-container {
        display: none;
    }
}

/* Accessibility Focus States */
.wizard-input:focus-visible,
.wizard-select:focus-visible,
.wizard-checkbox:focus-visible,
.wizard-btn:focus-visible {
    outline: 2px solid var(--wizard-primary);
    outline-offset: 2px;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .registration-wizard-card {
        /* Can add dark mode styles here if needed */
    }
}
