/* Registration Wizard Styles */

.registration-wizard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Wizard Header */
.wizard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.wizard-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Progress Indicator */
.wizard-progress {
    margin-bottom: 3rem;
}

.wizard-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
    position: relative;
}

.wizard-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.wizard-step .step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.wizard-step .step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: #e9ecef;
    color: #6c757d;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.wizard-step.active .step-number {
    background: #931980;
    color: white;
    border-color: #931980;
    box-shadow: 0 0 0 4px rgba(147, 25, 128, 0.1);
}

.wizard-step.completed .step-number {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.wizard-step .step-check {
    fill: white;
}

.wizard-step .step-info {
    text-align: center;
    max-width: 120px;
}

.wizard-step .step-title {
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.wizard-step .step-description {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

.wizard-step.active .step-title {
    color: #931980;
}

.wizard-step.completed .step-title {
    color: #28a745;
}

.step-connector {
    position: absolute;
    top: 24px;
    left: 130px;
    right: -130px;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.wizard-step.completed .step-connector {
    background: #28a745;
}

.progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: #931980);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Wizard Content */
.wizard-content {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.wizard-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e9ecef;
    border-top-color: #931980;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.wizard-loading p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Messages */
.wizard-messages {
    padding: 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

.wizard-message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.wizard-message:last-child {
    margin-bottom: 0;
}

.wizard-message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.wizard-message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.wizard-message.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Step Content */
.wizard-step-content {
    padding: 2rem;
    min-height: 400px;
    transition: opacity 0.3s ease-in-out;
}

/* Step transition states */
.wizard-step-content.step-hidden {
    display: none !important;
}

.wizard-step-content.step-visible {
    display: block !important;
    opacity: 1;
}

.wizard-step-content.step-fade-out {
    opacity: 0;
}

.wizard-step-content.step-fade-in {
    opacity: 1;
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.step-header h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Form Fields - Namespaced */
.registration-wizard-container .form-fields {
    max-width: 600px;
    margin: 0 auto;
}

.registration-wizard-container .field-group {
    margin-bottom: 1.5rem;
}

.registration-wizard-container .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.registration-wizard-container .field-group label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    color: #333 !important;
    font-size: 0.95rem !important;
}

.registration-wizard-container .required {
    color: #dc3545 !important;
    margin-left: 0.25rem !important;
}

.registration-wizard-container .field-group input:not([type="checkbox"]),
.registration-wizard-container .field-group textarea {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    background: white !important;
    box-sizing: border-box !important;
}

.registration-wizard-container .field-group input:focus,
.registration-wizard-container .field-group textarea:focus {
    outline: none !important;
    border-color: #931980 !important;
    box-shadow: 0 0 0 3px rgba(147, 25, 128, 0.1) !important;
}

.registration-wizard-container .field-group input.error,
.registration-wizard-container .field-group textarea.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.registration-wizard-container .field-hint {
    margin-top: 0.25rem !important;
    font-size: 0.85rem !important;
    color: #6c757d !important;
}

.registration-wizard-container .field-error {
    margin-top: 0.25rem !important;
    font-size: 0.85rem !important;
    color: #dc3545 !important;
    font-weight: 500 !important;
}

/* Password Input - Namespaced */
.registration-wizard-container .password-input-container {
    position: relative !important;
}

.registration-wizard-container .password-toggle {
    position: absolute !important;
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    color: #6c757d !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
    border-radius: 4px !important;
    transition: color 0.2s ease !important;
}

.registration-wizard-container .password-toggle:hover {
    color: #931980 !important;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
}

.strength-fill.weak {
    width: 25%;
    background: #dc3545;
}

.strength-fill.fair {
    width: 50%;
    background: #ffc107;
}

.strength-fill.good {
    width: 75%;
    background: #17a2b8;
}

.strength-fill.strong {
    width: 100%;
    background: #28a745;
}

.strength-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.strength-text.weak {
    color: #dc3545;
}

.strength-text.fair {
    color: #ffc107;
}

.strength-text.good {
    color: #17a2b8;
}

.strength-text.strong {
    color: #28a745;
}

/* Password Requirements */
.security-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.security-info h4 {
    margin: 0 0 0.75rem 0;
    color: #333;
    font-size: 0.95rem;
}

.password-requirements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.password-requirements li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #dc3545;
    font-weight: bold;
}

.password-requirements li.valid::before {
    content: "✓";
    color: #28a745;
}

/* Character Counter */
.char-counter {
    float: right;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Info Cards */
.info-card {
    display: flex;
    padding: 1rem;
    background: #faf7fa;
    border-radius: 8px;
    border-left: 4px solid #931980;
    margin: 1.5rem 0;
}

.info-icon {
    flex-shrink: 0;
    margin-right: 0.75rem;
    color: #931980;
}

.info-content h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 0.95rem;
}

.info-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}



/* Confirmation Summary */
.confirmation-summary {
    margin-bottom: 2rem;
}

.confirmation-summary h3 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.summary-section {
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.summary-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.edit-step-btn {
    background: none;
    border: none;
    color: #931980;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.edit-step-btn:hover {
    background: rgba(147, 25, 128, 0.1);
}

.summary-content {
    padding: 1rem;
}

.summary-item {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-label {
    color: #333;
    min-width: 140px;
    flex-shrink: 0;
}

.summary-value {
    color: #666;
    word-break: break-word;
}

.summary-value a {
    color: #931980;
    text-decoration: none;
}

.summary-value a:hover {
    text-decoration: underline;
}

/* Checkbox Groups */
.registration-wizard-container .checkbox-group {
    margin-bottom: 1rem !important;
}

.registration-wizard-container .field-group .checkbox-label,
.registration-wizard-container .field-group label.checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    cursor: pointer !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    gap: 0.75rem !important;
    margin-bottom: 0 !important;
    font-weight: normal !important;
}

.registration-wizard-container .checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    position: absolute !important;
    opacity: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    background: white;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.registration-wizard-container .checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #931980;
    border-color: #931980;
}

.registration-wizard-container .checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.registration-wizard-container .checkbox-label input[type="checkbox"]:focus + .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(147, 25, 128, 0.1);
}

.registration-wizard-container .checkbox-text a {
    color: #931980;
    text-decoration: none;
}

.registration-wizard-container .checkbox-text a:hover {
    text-decoration: underline;
}

/* Terms Section */
.terms-section {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.terms-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.terms-section > p {
    margin: 0 0 1.5rem 0;
    color: #666;
    font-size: 0.95rem;
}

/* Next Steps Info */
.next-steps-info {
    padding: 1.5rem;
    background: #faf7fa;
    border-radius: 8px;
    border-left: 4px solid #931980;
}

.next-steps-info h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.step-icon {
    width: 24px;
    height: 24px;
    background: #931980;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.step-text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Navigation */
.wizard-navigation {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex: 1;
}

.nav-spacer {
    flex: 1;
}

/* Wizard Buttons - Namespaced */
.registration-wizard-container .btn {
    font-weight: 500 !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    line-height: 1.3rem !important;
    padding: 0.75rem 1.5rem !important;
    border: 2px solid #000 !important;
    color: #fff !important;
    transition: all 0.2s ease-in-out !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 10px !important;
    height: auto !important;
    cursor: pointer !important;
    position: relative !important;
    text-decoration: none !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
    background: #000 !important;
}

.registration-wizard-container .btn-primary {
    background: #931980 !important;
    border-color: #931980 !important;
    color: #fff !important;
}

.registration-wizard-container .btn-primary:hover:not(:disabled) {
    background: #7b0e6f !important;
    border-color: #7b0e6f !important;
    transform: translateY(-1px) !important;
}

.registration-wizard-container .btn-secondary {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

.registration-wizard-container .btn-secondary:hover:not(:disabled) {
    background: #5a6268 !important;
    border-color: #5a6268 !important;
    transform: translateY(-1px) !important;
}

.registration-wizard-container .btn-lg {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
}

.registration-wizard-container .btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.registration-wizard-container .btn:disabled:hover {
    opacity: 0.6 !important;
    transform: none !important;
}

.registration-wizard-container .btn-icon {
    flex-shrink: 0 !important;
    fill: #fff !important;
}

/* Success/Notice Messages */
.wizard-success,
.wizard-notice {
    text-align: center;
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 12px;
}

.wizard-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.wizard-notice {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1rem auto;
}

.wizard-success h2,
.wizard-notice h2 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.wizard-success p,
.wizard-notice p {
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.wizard-success p:last-of-type,
.wizard-notice p:last-of-type {
    margin-bottom: 1.5rem;
}

/* Footer */
.wizard-footer {
    text-align: center;
    margin-top: 2rem;
}

.login-link {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.login-link a {
    color: #931980;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .registration-wizard-container {
        padding: 1rem 0.5rem;
    }

    .wizard-header h1 {
        font-size: 2rem;
    }

    .wizard-steps {
        /* Keep horizontal layout on mobile, just more compact */
        margin-bottom: 1.5rem;
    }

    .wizard-step {
        /* Compact mobile steps - keep title, hide description */
        flex: 1;
        margin: 0;
    }

    .wizard-step .step-description {
        display: none;
    }

    .wizard-step .step-title {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
    }

    .wizard-step .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .wizard-step .step-info {
        text-align: left;
        max-width: none;
    }

    .step-connector {
        display: none;
    }

    .progress-bar {
        margin-top: 1.5rem;
    }

    .wizard-step-content {
        padding: 1.5rem 1rem;
    }

    .step-header h2 {
        font-size: 1.5rem;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .wizard-navigation {
        padding: 1rem;
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .nav-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .nav-spacer {
        display: none;
    }

    .steps-list {
        gap: 0.75rem;
    }

    .summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .summary-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .summary-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .wizard-header h1 {
        font-size: 1.75rem;
    }

    .wizard-header p {
        font-size: 1rem;
    }

    /* Make steps even more compact on small phones */
    .wizard-step .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .wizard-step .step-title {
        font-size: 0.7rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }

    .btn-lg {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }
}

/* Success Page */
.registration-wizard-container .wizard-success-page {
    text-align: center !important;
    padding: 3rem 2rem !important;
    min-height: 400px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.registration-wizard-container .success-icon {
    margin-bottom: 2rem !important;
    animation: successBounce 0.6s ease-out !important;
}

.registration-wizard-container .success-content h2 {
    color: #931980 !important;
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
}

.registration-wizard-container .success-message {
    font-size: 1.125rem !important;
    color: #333 !important;
    margin-bottom: 0.75rem !important;
    max-width: 500px !important;
    line-height: 1.6 !important;
}

.registration-wizard-container .success-sub-message {
    font-size: 1rem !important;
    color: #666 !important;
    margin-bottom: 2rem !important;
    max-width: 500px !important;
    line-height: 1.5 !important;
}

.registration-wizard-container .success-details {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    max-width: 400px !important;
    margin: 0 auto !important;
}

.registration-wizard-container .success-details .detail-item {
    margin-bottom: 0.75rem !important;
    font-size: 0.95rem !important;
    color: #333 !important;
}

.registration-wizard-container .success-details .detail-item:last-child {
    margin-bottom: 0 !important;
}

.registration-wizard-container .success-details strong {
    color: #931980 !important;
}

@keyframes successBounce {
    0% {
        transform: scale(0.3) !important;
        opacity: 0 !important;
    }
    50% {
        transform: scale(1.1) !important;
        opacity: 0.8 !important;
    }
    100% {
        transform: scale(1) !important;
        opacity: 1 !important;
    }
}

/* Optional fields - hidden by default, JavaScript will show them if they have content */
.registration-wizard-container [data-field="phone"],
.registration-wizard-container [data-field="contact_person"],
.registration-wizard-container [data-field="company_phone"],
.registration-wizard-container [data-field="company_website"],
.registration-wizard-container [data-field="company_description"],
.registration-wizard-container [data-field="company_address"] {
    display: none !important;
}
