/* Error field styling */
.form-control.error-field {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

#form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

#form-message.success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}


.b2c-registration-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.b2c-form h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: #555;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-group.checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

.form-group.checkbox label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn {
    padding: 12px 40px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login Link Section */
.login-link-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.login-link-section p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.login-link-section a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.login-link-section a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Responsive design */
@media (max-width: 768px) {
    .b2c-registration-container {
        margin: 20px;
        padding: 20px;
    }

    .b2c-form h2 {
        font-size: 24px;
    }

    .form-section h3 {
        font-size: 16px;
    }

    .btn {
        width: 100%;
    }
}

/* RTL support for Arabic */
[dir="rtl"] .form-group input,
[dir="rtl"] .form-group select {
    text-align: right;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .form-group.checkbox {
    flex-direction: row-reverse;
}

[dir="rtl"] .form-group.checkbox input[type="checkbox"] {
    margin-right: 0;
    margin-left: 10px;
}