/**
 * Company Self-Registration Form Styles
 * Modern, responsive design for public registration
 */

/* Container & Layout */
.aml-registration-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Progress Steps */
.registration-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.registration-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 auto 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.progress-step.active .step-label {
    color: #0891b2;
    font-weight: 600;
}

.progress-step.completed .step-number {
    background: #10b981;
    color: white;
}

/* Form Card */
.registration-form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Header */
.registration-header {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.registration-header h1 {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.selected-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.tier-icon {
    font-size: 20px;
}

.tier-name {
    font-weight: 600;
    font-size: 15px;
}

/* Form Steps */
.registration-form {
    padding: 40px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInSlide 0.4s ease;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    margin: 0 0 30px 0;
    font-size: 22px;
    color: #1e293b;
    font-weight: 600;
}

/* Form Groups */
.form-row {
    margin-bottom: 24px;
}

.form-row-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 14px;
}

.required {
    color: #ef4444;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 85%;
}

.form-control:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.form-control.error {
    border-color: #ef4444;
}

.form-control.success {
    border-color: #10b981;
}

.form-control.checking {
    border-color: #0891b2;
}

.field-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.field-error.visible {
    display: block;
}

.field-success {
    color: #10b981;
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.field-success i {
    font-size: 16px;
}

.field-checking {
    color: #0891b2;
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-checking i {
    font-size: 14px;
}

.field-help {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #0891b2;
}

.toggle-password i {
    font-size: 20px;
}

/* Generate Password Button */
.btn-generate-password {
    background: transparent;
    color: #0891b2;
    border: 1px solid #cbd5e1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    transition: all 0.2s ease;
    width: auto;
}

.btn-generate-password:hover {
    background: #f0f9ff;
    border-color: #0891b2;
    color: #0e7490;
    transform: translateY(-1px);
}

.btn-generate-password i {
    font-size: 18px;
    display: flex;
    align-items: center;
}

.btn-generate-password span {
    font-size: 13px;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Password Strength Meter */
.password-strength-meter {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    background: #e2e8f0;
}

.strength-bar.weak {
    width: 33%;
    background: #ef4444;
}

.strength-bar.medium {
    width: 66%;
    background: #f59e0b;
}

.strength-bar.strong {
    width: 100%;
    background: #10b981;
}

/* Honeypot (hidden anti-spam field) */
.aml-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Billing Cycle Selector */
.billing-cycle-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cycle-option {
    cursor: pointer;
}

.cycle-option input[type="radio"] {
    display: none;
}

.cycle-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.cycle-option:hover .cycle-card {
    border-color: #0891b2;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.1);
}

.cycle-option input[type="radio"]:checked + .cycle-card {
    border-color: #0891b2;
    background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.2);
}

.cycle-name {
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cycle-price {
    font-size: 28px;
    font-weight: 700;
    color: #0891b2;
    margin-bottom: 4px;
}

.cycle-period {
    font-size: 13px;
    color: #64748b;
}

.cycle-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Info Box */
.info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.info-box-blue {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.info-box i {
    color: #3b82f6;
    flex-shrink: 0;
}

.info-box strong {
    display: block;
    color: #1e40af;
    margin-bottom: 4px;
}

.info-box p {
    margin: 0;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.5;
}

/* Template Selection */
.template-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.selection-info {
    font-weight: 600;
    color: #334155;
}

.selection-info .selected-count {
    color: #0891b2;
    font-size: 18px;
}

.selection-help {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.template-card {
    cursor: pointer;
}

.template-checkbox {
    display: none;
}

.template-card-content {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.template-card:hover .template-card-content {
    border-color: #0891b2;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.1);
    transform: translateY(-2px);
}

.template-checkbox:checked + .template-card-content {
    border-color: #0891b2;
    background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
}

.template-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.template-name {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
    line-height: 1.4;
}

.template-check {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #0891b2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.template-checkbox:checked + .template-card-content .template-check {
    opacity: 1;
}

.template-card-content.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Review Section */
.review-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.review-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #0891b2;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.review-value {
    font-size: 15px;
    color: #1e293b;
}

.review-templates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-template-tag {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
}

.checkbox-label a {
    color: #0891b2;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    justify-content: flex-end;
}

.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.4);
}

.btn-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.btn-loader {
    display: inline-block;
}

.rotating {
    animation: rotate 1s linear infinite;
}

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

/* Form Messages */
.form-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.form-message i {
    flex-shrink: 0;
    font-size: 24px;
}

.form-message-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.form-message-error i {
    color: #dc2626;
}

.form-message-error a {
    color: #991b1b;
    text-decoration: underline;
}

.form-message-error a:hover {
    color: #7f1d1d;
}

/* Success Message */
.registration-success {
    padding: 60px 40px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.success-icon i {
    font-size: 48px;
    color: white;
}

.registration-success h2 {
    margin: 0 0 16px 0;
    font-size: 28px;
    color: #1e293b;
}

.success-message {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 32px;
}

.success-message strong {
    color: #0891b2;
}

.success-instructions {
    background: #f0fdfa;
    border: 2px solid #ccfbf1;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.success-instructions p {
    margin: 0 0 12px 0;
    font-weight: 600;
    color: #0e7490;
}

.success-instructions ol {
    margin: 0;
    padding-left: 24px;
    color: #334155;
}

.success-instructions li {
    margin: 8px 0;
}

.success-email {
    margin: 20px 0 20px;
}

.success-note {
    display: inline-block;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
}

.success-note i {
    font-size: 20px;
}

.resend-link {
    font-size: 14px;
    color: #64748b;
}

.resend-link a {
    color: #0891b2;
    text-decoration: none;
    font-weight: 600;
}

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

/* Footer */
.registration-footer {
    margin-top: 40px;
    padding: 30px 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
}

.trust-badge i {
    color: #10b981;
    font-size: 20px;
}

/* Error State */
.aml-registration-error {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    background: #fef2f2;
    border: 2px solid #fee2e2;
    border-radius: 12px;
    text-align: center;
}

.aml-registration-error h2 {
    color: #991b1b;
    margin: 0 0 16px 0;
}

.aml-registration-error p {
    color: #7f1d1d;
    margin: 0;
}

.aml-registration-error a {
    color: #dc2626;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .registration-form {
        padding: 24px;
    }

    .registration-header {
        padding: 30px 24px;
    }

    .registration-header h1 {
        font-size: 24px;
    }

    .form-row-2col,
    .billing-cycle-selector,
    .review-grid {
        grid-template-columns: 1fr;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .trust-badges {
        flex-direction: column;
        gap: 16px;
    }

    .registration-progress {
        margin-bottom: 30px;
    }

    .step-label {
        font-size: 11px;
    }

    .step-number {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .aml-registration-wrapper {
        padding: 0 12px;
    }

    .step-label {
        display: none;
    }

    .registration-success {
        padding: 40px 24px;
    }

    .success-icon {
        width: 60px;
        height: 60px;
    }

    .success-icon i {
        font-size: 36px;
    }
}
