/* ============================================================
   THE GOAT - صفحة التسجيل (خطوة واحدة)
   ============================================================ */

:root {
    --primary-purple: #5b5ea6;
    --hover-purple: #45488c;
    --text-dark: #111111;
    --wa-green: #25d366;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Alexandria', sans-serif;
}

body {
    background-color: #fbfbfd;
    background-image: radial-gradient(rgba(91, 94, 166, 0.13) 1px, transparent 1px);
    background-size: 22px 22px;
    min-height: 100vh;
    color: var(--text-dark);
}

a {
    text-decoration: none;
}

[dir="ltr"] .flip-ltr {
    transform: scaleX(-1);
}

.register-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* الهيدر */
.register-header {
    padding: 24px 28px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.register-logo img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.lang-switch-link {
    position: absolute;
    inset-inline-start: 28px;
    top: 26px;
    color: #888888;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 7px 13px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.lang-switch-link:hover {
    color: var(--text-dark);
    border-color: var(--primary-purple);
}

/* المحتوى */
.register-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px 50px;
}

.register-card {
    width: min(520px, 100%);
    background: #ffffff;
    border-radius: 20px;
    padding: 38px 34px;
    box-shadow: 0 18px 50px rgba(20, 20, 40, 0.08);
}

.register-title {
    font-size: 1.65rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.register-sub {
    color: #777d86;
    font-size: 0.93rem;
    font-weight: 400;
    text-align: center;
    line-height: 1.8;
    margin-bottom: 28px;
}

/* الحقول */
.field {
    margin-bottom: 18px;
}

.field-label {
    display: block;
    color: var(--text-dark);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.field-input {
    width: 100%;
    border: 1.5px solid #e2e5ef;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(91, 94, 166, 0.1);
}

.field-input:disabled {
    background: #f5f6fa;
    color: #9aa0a8;
    cursor: not-allowed;
}

.field-input::placeholder {
    color: #a8aeb8;
    font-weight: 400;
}

.field-input.ltr {
    direction: ltr;
}

[dir="rtl"] .field-input.ltr::placeholder {
    direction: rtl;
}

.otp-input {
    letter-spacing: 8px;
    font-weight: 700;
    font-size: 1.15rem;
    text-align: center;
}

/* ------------------------------------------------------------
   حقل رقم الواتساب: الدولة والرقم في مجموعة إدخال واحدة
   ------------------------------------------------------------ */
.phone-input-group {
    display: flex;
    align-items: stretch;
    direction: ltr;
    border: 1.5px solid #e2e5ef;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-input-group:focus-within {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(91, 94, 166, 0.1);
}

.country-select {
    flex: 0 0 auto;
    width: 148px;
    border: none;
    border-right: 1.5px solid #e2e5ef;
    outline: none;
    background: #f7f8fc;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 14px 30px 14px 12px;
    cursor: pointer;
    /* سهم القائمة يُرسم يدوياً لأن appearance معطّل */
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 11px;
    background-position: right 11px center;
    text-overflow: ellipsis;
}

.country-select:hover {
    background-color: #eef0f7;
}

.phone-number-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

.phone-number-input::placeholder {
    color: #a8aeb8;
    font-weight: 400;
    letter-spacing: 0;
}

@media (max-width: 400px) {
    .country-select {
        width: 118px;
        font-size: 0.85rem;
        padding-inline: 10px 26px;
    }
}

/* صف الهاتف + زر طلب الرمز */
.field-row {
    display: flex;
    gap: 10px;
}

.field-row .field-input {
    flex: 1;
    min-width: 0;
}

.btn-otp {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--wa-green);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.25s ease, opacity 0.25s ease;
}

/* المُعدِّل بعد الأساس حتى لا تلغي padding الأساس قيمته */
.btn-otp-block {
    width: 100%;
    margin-top: 12px;
}

.btn-otp:hover:not(:disabled) {
    background: #1eb855;
}

.btn-otp:disabled {
    opacity: 0.6;
    cursor: default;
}

.btn-otp i {
    font-size: 1.05rem;
}

.field-hint {
    color: #9aa0a8;
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: 7px;
    line-height: 1.7;
}

/* رسائل الخطأ والملاحظات */
.form-error {
    color: #dc3545;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.7;
    min-height: 1.4em;
    margin: 4px 0 14px;
}

.form-error.is-note {
    color: #8a8f98;
    font-weight: 500;
    font-size: 0.82rem;
}

/* زر التسجيل */
.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-purple);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(91, 94, 166, 0.28);
    transition: background-color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.btn-submit:hover:not(:disabled) {
    background: var(--hover-purple);
    transform: translateY(-2px);
}

.btn-submit:disabled {
    opacity: 0.75;
    cursor: default;
    transform: none;
}

.register-alt {
    text-align: center;
    color: #777d86;
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 20px;
}

.register-alt a {
    color: var(--primary-purple);
    font-weight: 700;
}

.register-alt a:hover {
    text-decoration: underline;
}

/* الموبايل */
@media (max-width: 560px) {
    .register-card {
        padding: 30px 22px;
    }

    .register-title {
        font-size: 1.4rem;
    }

    .field-row {
        flex-direction: column;
    }

}
