/**
 * Registration Form Styles
 * Multi-step registration form with phone and email verification
 */

.platform-registration-form {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.platform-registration-form h2 {
    margin-top: 0;
    color: #2c5530;
    border-bottom: 2px solid #2c5530;
    padding-bottom: 10px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #2c5530;
    box-shadow: 0 0 0 1px #2c5530;
}

.form-group input.error,
.form-group select.error {
    border-color: #d63638 !important;
    border-width: 2px !important;
    background-color: #fff5f5;
}

.form-group input.success {
    border-color: #00a32a !important;
    border-width: 2px !important;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-group .required {
    color: #d63638;
}

.btn {
    padding: 12px 24px;
    background: #2c5530;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.btn:hover {
    background: #1e3a22;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #666;
}

.btn-secondary:hover {
    background: #444;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.verification-code-input {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.verification-code-input input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    margin: 0 5px;
    font-size: 12px;
    color: #666;
}

.progress-step.active {
    background: #2c5530;
    color: #fff;
    font-weight: bold;
}

.progress-step.completed {
    background: #10b981;
    color: #fff;
}

/* Phone input flexbox layout */
.phone-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.phone-input-wrapper .country-code-select {
    width: 120px;
    flex-shrink: 0;
}

.phone-input-wrapper .phone-number-wrapper {
    flex: 1;
}

.phone-input-wrapper .phone-number-wrapper input {
    width: 100%;
}

.phone-preview {
    margin-top: 5px;
    font-weight: bold;
    color: #2c5530;
}

/* SMS/Email verification step text alignment */
.text-center {
    text-align: center;
}

.margin-top-20 {
    margin-top: 20px;
}

.resend-cooldown {
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* What happens next info box */
.info-box {
    margin: 30px auto;
    max-width: 500px;
    padding: 20px;
    background: #f0f6fc;
    border-left: 4px solid #2c5530;
    text-align: left;
}

.info-box p {
    margin: 0 0 10px 0;
}

.info-box ol {
    margin: 0;
    padding-left: 20px;
}

.info-box .info-note {
    margin: 15px 0 0 0;
    font-size: 13px;
    color: #666;
}

.expiry-note {
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* Success/Error message containers */
.message-container {
    margin: 40px auto;
    max-width: 600px;
    padding: 30px;
    text-align: center;
}

.message-container h2 {
    margin-top: 0;
}

.message-container.error h2 {
    color: #dc3545;
}

.message-container.success h2 {
    color: #166534;
}

.message-container .site-info {
    background: #f0f9ff;
    border-left: 4px solid #10b981;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.message-container .action-button {
    margin-top: 30px;
}

.message-container .support-note {
    margin-top: 20px;
    font-size: 14px;
}

.message-container .large-text {
    font-size: 18px;
}

/* Add Another Site form (for returning verified users) */
.add-another-site-form {
    padding: 20px 0;
}

.add-another-site-form h2 {
    margin-bottom: 10px;
}

.add-another-site-form .welcome-message {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

.add-another-site-form .section-title {
    font-size: 14px;
    font-weight: bold;
    color: #555;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* Disabled fields for pre-filled user info */
.form-group.disabled-field input {
    background-color: #f5f5f5;
    color: #666;
    border-color: #ddd;
    cursor: not-allowed;
}

.form-group.disabled-field label {
    color: #666;
}

.form-group .form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Subdomain preview in add another site form */
.add-another-site-form .subdomain-preview {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

.add-another-site-form .subdomain-preview strong {
    color: #2c5530;
}

/* Submit button area */
.add-another-site-form .form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Loading state for create button */
.add-another-site-form .btn.loading {
    position: relative;
    color: transparent;
}

.add-another-site-form .btn.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Organization Type Radio Cards */
.org-type-selector {
    margin-bottom: 25px;
}

.radio-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.radio-card {
    display: block;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    background: #fff;
}

.radio-card:hover {
    border-color: #2c5530;
    background: #f9fbfc;
}

.radio-card.selected {
    border-color: #2c5530;
    background: #f0f6fc;
    box-shadow: 0 0 0 1px #2c5530;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card .card-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.radio-card .card-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.radio-card .card-title {
    display: block;
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.radio-card .card-desc {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: normal;
    line-height: 1.4;
}

/* Section divider */
.section-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 30px 0;
}

/* Number of sites dropdown styling */
#num-sites-group {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #2c5530;
}

#num-sites-group label {
    font-weight: normal;
    color: #333;
}

#num-sites-group select {
    margin-top: 8px;
}

#num-sites-group small {
    color: #666;
    font-style: italic;
}

/* Responsive adjustments for radio cards */
@media (min-width: 600px) {
    .radio-cards {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .radio-card {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 160px;
    }

    .radio-card .card-content {
        flex-direction: column;
        text-align: center;
    }

    .radio-card .card-icon {
        font-size: 36px;
        margin-bottom: 8px;
    }
}
