/* ==========================================================================
   Registration page.
   ========================================================================== */

.register-form {
    padding: 60px 0;
}

.register-form .main-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.register-form-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.register-form-desc {
    font-size: 16px;
    color: var(--color-gray);
}

.register-form form {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* ---------- Text fields ---------- */
.input-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.input-form label,
.check-item label {
    font-size: 16px;
    color: #696f79;
}

.input-form input,
.input-form select {
    width: 100%;
    height: 55px;
    border-radius: 12px;
    padding: 0 10px;
    border: 1px solid var(--color-gray);
    background-color: var(--color-white);
}

/* phone numbers and e-mail addresses always read left to right */
.input-form input[type="tel"],
.input-form input[type="email"] {
    direction: ltr;
}

html[dir="rtl"] .input-form input[type="tel"],
html[dir="rtl"] .input-form input[type="email"] {
    text-align: right;
}

.input-form input:focus-visible,
.input-form select:focus-visible {
    outline: none;
    border-color: var(--color-Primary1);
    box-shadow: 0 0 0 3px var(--color-Primary2);
}

/* ---------- Checkbox groups ---------- */
.register-form-check legend {
    padding: 0;
    margin: 0 0 15px;
    font-size: 16px;
    line-height: 30px;
    color: black;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.check-grid {
    row-gap: 15px;
}

.check-item {
    display: flex;
    gap: 16px;
    align-items: center;
}

.check-item input[type="checkbox"] {
    appearance: none;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin: 0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff center / contain no-repeat;
    print-color-adjust: exact;
    cursor: pointer;
}

.check-item input[type="checkbox"]:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.check-item input[type="checkbox"]:focus-visible {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
}

.check-item label {
    cursor: pointer;
}

.register-form-check .field-error {
    margin-top: 10px;
}

/* ---------- Validation ---------- */
.field-error {
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-error);
}

.field-error:empty {
    display: none;
}

.input-form .is-invalid {
    border-color: var(--color-error);
}

/* ---------- Submit ---------- */
.register-form-btn {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.register-form-btn button {
    width: 250px;
    max-width: 100%;
}

.register-form-btn button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.form-status {
    width: 100%;
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid transparent;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

.form-status[hidden] {
    display: none;
}

.form-status--success {
    background: rgba(46, 204, 113, 0.12);
    border-color: #2ecc71;
    color: #1e8e4e;
}

.form-status--error {
    background: rgba(231, 76, 60, 0.12);
    border-color: #e74c3c;
    color: var(--color-error);
}

.form-status--info {
    background: rgba(52, 152, 219, 0.12);
    border-color: #3498db;
    color: #2176ae;
}

/* ---------- Result popup ---------- */
.form-dialog {
    width: min(92vw, 440px);
    padding: 36px 28px 28px;
    border: 0;
    border-radius: 20px;
    text-align: center;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.form-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.form-dialog-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.form-dialog-icon svg {
    width: 36px;
    height: 36px;
}

.form-dialog--success .form-dialog-icon {
    background: #2ecc71;
}

.form-dialog--error .form-dialog-icon {
    background: var(--color-error);
}

.form-dialog--success .icon-error,
.form-dialog--error .icon-success {
    display: none;
}

.form-dialog h2 {
    font-size: 22px;
    color: var(--color-Primary1);
    margin-bottom: 10px;
}

.form-dialog p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 24px;
}

.form-dialog .ctm-btn1 {
    min-width: 140px;
}

@media (max-width: 768px) {
    .register-form {
        padding: 40px 0;
    }
}
