/* 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,
.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

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


/* B2B Registration Form Styles */

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

.b2b-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: none;
}

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

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

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

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

.form-section h3 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

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

.form-group.checkbox {
    flex-direction: row;
    align-items: center;
}

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

.form-group label.required::after {
    content: " *";
    color: #dc3545;
}

.form-group.checkbox label {
    margin-bottom: 0;
    margin-left: 8px;
    font-weight: normal;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.form-group input[type="checkbox"]:focus {
    box-shadow: none;
}

.form-group.error input,
.form-group.error select {
    border-color: #dc3545;
}

.form-group .error-message {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.3);
}

.btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* 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) {
    .b2b-registration-container {
        padding: 15px;
    }

    .b2b-form {
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-section {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .form-section h3 {
        font-size: 1.1em;
        margin-bottom: 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .b2b-registration-container {
        padding: 10px;
    }

    .b2b-form {
        padding: 10px;
    }

    .form-group label {
        font-size: 0.9em;
    }

    .form-group input,
    .form-group select {
        padding: 10px;
        font-size: 16px;
    }
}