/* ================= تصميم نموذج إنشاء الحساب الجديد ================= */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (max-width: 768px) {
    .register-form {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .register-form {
        gap: 10px;
    }
}

.form-row {
    display: flex;
    gap: 15px;
}

@media (max-width: 768px) {
    .form-row {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .form-row {
        gap: 10px;
        flex-direction: column;
    }
}

.input-box {
    flex: 1;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 15px;
    position: relative;
    transition: border-color 0.3s ease;
}

@media (max-width: 768px) {
    .input-box {
        padding: 8px 12px;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .input-box {
        padding: 8px 12px;
        border-radius: 6px;
        min-height: 44px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.input-box:focus-within {
    border-color: var(--ynmo-green);
}

.input-box label {
    display: block;
    font-size: 11px;
    color: var(--ynmo-green);
    font-weight: 700;
    margin-bottom: 2px;
}

@media (max-width: 768px) {
    .input-box label {
        font-size: 10px;
        margin-bottom: 2px;
    }
}

@media (max-width: 480px) {
    .input-box label {
        font-size: 11px;
        margin-bottom: 3px;
    }
}

.input-box input {
    width: 100%;
    border: none;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    background: transparent;
}

@media (max-width: 768px) {
    .input-box input {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .input-box input {
        font-size: 14px;
        min-height: 30px;
        padding: 4px 0;
    }
}

/* Remove browser autofill tint inside auth inputs */
.input-box input:-webkit-autofill,
.input-box input:-webkit-autofill:hover,
.input-box input:-webkit-autofill:focus,
.input-box input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: var(--text-dark) !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    transition: background-color 9999s ease-out 0s;
}

/* تصميم حقل رقم الهاتف وكود الدولة */
.phone-box {
    display: flex;
    padding: 0;
    align-items: center;
}

@media (max-width: 480px) {
    .phone-box {
        border-radius: 6px;
    }
}

.phone-box input {
    padding: 15px;
    flex: 1;
}

@media (max-width: 768px) {
    .phone-box input {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .phone-box input {
        padding: 8px 10px;
        font-size: 12px;
        min-height: 36px;
    }
}

.country-code {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border-right: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .country-code {
        padding: 10px 12px;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .country-code {
        padding: 8px 10px;
        gap: 4px;
    }
}

.country-code img {
    width: 24px;
    border-radius: 2px;
}

@media (max-width: 480px) {
    .country-code img {
        width: 20px;
    }
}

/* تصميم حقل كلمة المرور وأيقونة العين */
.password-box {
    position: relative;
}

.eye-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ynmo-green);
    opacity: 0.5;
    cursor: pointer;
    font-size: 18px;
}

@media (max-width: 768px) {
    .eye-icon {
        left: 10px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .eye-icon {
        left: 8px;
        font-size: 14px;
    }
}

/* شروط كلمة المرور السفلية */
.password-rules {
    list-style: none;
    padding: 0;
    margin-top: 5px;
}

@media (max-width: 480px) {
    .password-rules {
        margin-top: 3px;
    }
}

.password-rules li {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 480px) {
    .password-rules li {
        font-size: 12px;
        margin-bottom: 6px;
        gap: 6px;
    }
}

.password-rules li i {
    font-size: 15px;
}

@media (max-width: 480px) {
    .password-rules li i {
        font-size: 13px;
    }
}
/* ================= تصميم أزرار الفورم (إنشاء حساب والرجوع) ================= */
.form-buttons-container {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    width: 100%;
}

@media (max-width: 768px) {
    .form-buttons-container {
        gap: 12px;
        margin-top: 28px;
    }
}

@media (max-width: 480px) {
    .form-buttons-container {
        gap: 10px;
        margin-top: 18px;
        flex-direction: column;
    }
}

/* زر إنشاء الحساب الأساسي */
.btn-create {
    flex: 2;
    /* بياخد ضعف مساحة زرار الرجوع */
    background-color: var(--ynmo-green);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

@media (max-width: 768px) {
    .btn-create {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 6px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .btn-create {
        flex: unset;
        width: 100%;
        padding: 11px 14px;
        font-size: 14px;
        min-height: 46px;
        border-radius: 6px;
    }
}

.btn-create:hover {
    background-color: #129c76;
    box-shadow: 0 4px 15px rgba(21, 179, 137, 0.2);
    /* ظل خفيف أخضر عند الوقوف عليه */
}

/* زر الرجوع الثانوي */
.btn-return {
    flex: 1;
    /* مساحة أصغر */
    background-color: #f8fafc;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* المسافة بين الكلمة والسهم */
}

@media (max-width: 768px) {
.btn-return {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    min-height: 44px;
    }
}

@media (max-width: 480px) {
    .btn-return {
        flex: unset;
        width: 100%;
        padding: 11px 14px;
        font-size: 14px;
        min-height: 46px;
        border-radius: 6px;
    }
}

/* Reference registration layout for provider/therapist pages */
body:has(.register-screen) .form-side {
    background:
        radial-gradient(circle at left bottom, rgba(85, 213, 190, 0.16), transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
}

body:has(.register-screen) .form-content-wrapper {
    max-width: 540px;
    justify-content: flex-start;
    padding-top: 10px;
}

.register-screen {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.register-screen .step-title {
    display: none;
}

.register-identity-card {
    min-height: 184px;
    border: 1px solid rgba(101, 124, 176, 0.18);
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,252,252,0.96));
    box-shadow: 0 20px 40px rgba(111, 140, 167, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #6776a0;
    text-align: center;
}

.register-identity-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: #6a76a7;
    font-size: 3rem;
}

.register-identity-label {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.register-copy-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.register-copy-chip,
.register-title-chip,
.register-form--reference .input-box label,
.register-form--reference .password-rules li span,
.register-form--reference .phone-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    background: #19b287;
    color: #fff;
}

.register-copy-chip {
    font-size: 1.9rem;
    font-weight: 700;
}

.register-title-chip {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.register-form--reference {
    gap: 18px;
}

.register-form--reference .form-row {
    gap: 12px;
}

.register-form--reference .input-box {
    border: 0;
    border-radius: 8px;
    min-height: 56px;
    padding: 14px 18px;
    box-shadow: 0 10px 22px rgba(111, 140, 167, 0.1);
    background: rgba(255,255,255,0.98);
}

.register-form--reference .input-box label {
    position: absolute;
    top: -12px;
    right: 18px;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
}

.register-form--reference .input-box input {
    font-size: 1.45rem;
    min-height: 30px;
}

.register-form--reference .phone-input-container {
    padding-inline: 16px;
}

.register-form--reference .phone-input-container label {
    right: auto;
    left: 18px;
}

.register-form--reference .password-box {
    padding-left: 52px;
}

.register-form--reference .eye-icon {
    left: 18px;
    color: #8bdcc9;
    opacity: 1;
}

.register-form--reference .password-rules {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-top: -2px;
}

.register-form--reference .password-rules li {
    margin: 0;
    gap: 10px;
    color: #7f8ca8;
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.register-form--reference .password-rules li i {
    color: #b7c0d4;
    font-size: 1.35rem;
}

.register-form--reference .form-buttons-container {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid #dfe6ee;
    gap: 18px;
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.register-form--reference .btn-create {
    flex: 0 0 246px;
    min-height: 58px;
    border-radius: 6px;
    font-size: 1.55rem;
    font-weight: 700;
}

.register-form--reference .btn-return {
    flex: 0 0 auto;
    min-width: 74px;
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: #19b287;
    color: #fff;
    font-size: 1.35rem;
}

.register-screen + .info-side,
body:has(.register-screen) .brand-name,
body:has(.register-screen) .main-heading,
body:has(.register-screen) .sub-heading,
body:has(.register-screen) .laptop-mockup {
    display: none;
}

@media (max-width: 768px) {
    .register-identity-card {
        min-height: 150px;
        gap: 12px;
    }

    .register-identity-label {
        font-size: 1.6rem;
    }

    .register-copy-chip {
        font-size: 1.35rem;
    }

    .register-title-chip {
        font-size: 1.8rem;
    }

    .register-form--reference .input-box label {
        font-size: 1rem;
    }

    .register-form--reference .input-box input {
        font-size: 1.15rem;
    }

    .register-form--reference .btn-create {
        flex: 1 1 auto;
        min-height: 52px;
        font-size: 1.25rem;
    }

    .register-form--reference .btn-return {
        min-height: 40px;
        font-size: 1.05rem;
    }
}

.btn-return:hover {
    background-color: #f1f5f9;
    color: var(--text-dark);
    border-color: #cbd5e1;
}

.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 12px;
    gap: 12px;
}

@media (max-width: 480px) {
    .login-actions {
        margin-top: 4px;
        margin-bottom: 8px;
        gap: 8px;
        flex-wrap: wrap;
        flex-direction: column;
        align-items: flex-start;
    }
}

.remember-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
}

@media (max-width: 480px) {
    .remember-check {
        font-size: 13px;
        gap: 4px;
    }
}

.remember-check input {
    accent-color: var(--ynmo-green);
    width: 16px;
    height: 16px;
}

@media (max-width: 480px) {
    .remember-check input {
        width: 14px;
        height: 14px;
    }
}

.forgot-link {
    color: var(--ynmo-green);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 480px) {
    .forgot-link {
        font-size: 13px;
    }
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Hide progress dots in login/register form screens */
.split-layout .step-dots,
.split-layout .dot {
    display: none !important;
}
/* ================= تصميم مكتبة أرقام الهواتف ================= */
.specialist-login-prompt {
    margin: 0 0 18px;
    text-align: right;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
}

.specialist-login-prompt a {
    color: var(--ynmo-green);
    font-weight: 700;
    text-decoration: none;
}

.specialist-register-title {
    margin: 0 0 28px;
    color: var(--text-dark);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

body:has(.specialist-register-title) .form-side {
    background: #fff;
    padding: 40px 60px;
}

body:has(.specialist-register-title) .form-header {
    display: flex;
}

body:has(.specialist-register-title) .form-content-wrapper {
    max-width: 500px;
    justify-content: center;
    padding-top: 0;
}

body:has(.specialist-register-title) .register-screen {
    gap: 0;
}

body:has(.specialist-register-title) .register-form--reference {
    gap: 14px;
}

body:has(.specialist-register-title) .register-form--reference .input-box {
    min-height: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 14px;
    box-shadow: none;
}

body:has(.specialist-register-title) .register-form--reference .input-box label {
    position: static;
    min-height: auto;
    padding: 0;
    background: transparent;
    color: #888 !important;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 2px;
}

body:has(.specialist-register-title) .register-form--reference .input-box input {
    min-height: auto;
    padding-top: 0;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 400;
}

body:has(.specialist-register-title) .register-form--reference .input-box input::placeholder {
    color: transparent;
    opacity: 0;
}

body:has(.specialist-register-title) .register-form--reference .input-box input::-webkit-input-placeholder {
    color: transparent;
    opacity: 0;
}

body:has(.specialist-register-title) .register-form--reference .phone-input-container label {
    left: auto;
    right: auto;
}

body:has(.specialist-register-title) .register-form--reference .password-rules {
    align-items: flex-start;
    gap: 8px;
    margin-top: 5px;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

body:has(.specialist-register-title) .register-form--reference .password-rules li {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.5;
    justify-content: flex-end;
    text-align: left;
    flex-direction: row;
}

body:has(.specialist-register-title) .register-form--reference .password-rules li i {
    color: #b7c0d4;
    font-size: 15px;
}

body:has(.specialist-register-title) .register-form--reference .form-buttons-container {
    margin-top: 40px;
    padding-top: 0;
    border-top: 0;
    align-items: center;
    justify-content: stretch;
    flex-direction: row;
    gap: 15px;
}

body:has(.specialist-register-title) .register-form--reference .btn-create {
    flex: 2;
    min-height: 56px;
    border-radius: 8px;
    font-size: 16px;
}

body:has(.specialist-register-title) .register-form--reference .btn-return {
    flex: 1;
    min-width: 0;
    min-height: 56px;
    padding: 14px;
    background: #f8fafc;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    box-shadow: none;
}

body:has(.specialist-register-title) .info-side {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    background-color: var(--bg-light);
    padding: 60px 80px;
}

body:has(.specialist-register-title) .info-content {
    width: 100%;
}

body:has(.specialist-register-title) .specialist-side-card {
    display: none;
}

body:has(.specialist-register-title) .specialist-side-card .register-identity-icon {
    width: 42px;
    height: 42px;
    font-size: 2rem;
}

body:has(.specialist-register-title) .specialist-side-card .register-identity-label {
    color: #53628c;
    font-size: 1rem;
    font-weight: 700;
}

body:has(.specialist-register-title) .brand-name,
body:has(.specialist-register-title) .main-heading,
body:has(.specialist-register-title) .sub-heading,
body:has(.specialist-register-title) .laptop-mockup,
body:has(.specialist-register-title) .bg-shape {
    display: block;
}

@media (max-width: 768px) {
    body:has(.specialist-register-title) .form-side {
        padding: 20px 16px;
    }

    body:has(.specialist-register-title) .info-side {
        display: none;
    }
}

.phone-input-container {
    display: flex;
    flex-direction: column;
}

.iti {
    width: 100%;
}

@media (max-width: 480px) {
    .iti {
        border-radius: 6px;
    }
}

/* تظبيط اتجاه القائمة عشان العربي */
.iti__flag-container {
    direction: ltr;
}

.iti__selected-flag {
    border-radius: 8px 0 0 8px;
}

body:has(.specialist-register-title) .iti__country-list {
    width: 148px;
    max-height: 236px;
    overflow-y: auto;
    border: 1px solid #cfd6df;
    border-radius: 2px;
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.12);
    direction: ltr;
    text-align: left;
    font-family: 'Cairo', sans-serif;
    font-size: 10px;
    z-index: 20;
}

body:has(.specialist-register-title) .iti__country {
    min-height: 34px;
    padding: 5px 7px;
    white-space: normal;
    line-height: 1.25;
}

body:has(.specialist-register-title) .iti__country-name {
    margin-right: 4px;
}

body:has(.specialist-register-title) .iti__dial-code {
    color: #7c8798;
}

body:has(.specialist-register-title) .iti__divider {
    padding-bottom: 3px;
    margin-bottom: 3px;
}

body:has(.specialist-register-title) .iti__search-input {
    width: calc(100% - 8px);
    height: 30px;
    margin: 4px;
    padding: 0 7px;
    border: 1px solid #d9dee7;
    border-radius: 3px;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 10px;
}

@media (max-width: 480px) {
    .iti__selected-flag {
        border-radius: 6px 0 0 6px;
    }

    body:has(.specialist-register-title) .iti__country-list {
        width: 140px;
        max-height: 220px;
    }
}

/* شكل حقل الإدخال نفسه */
.international-phone {
    width: 100% !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 15px !important;
    color: var(--text-dark) !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

@media (max-width: 480px) {
    .international-phone {
        font-size: 14px !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }
}

/* إخفاء الحدود الافتراضية للمكتبة عشان نستخدم حدود الـ input-box بتاعتنا */
.iti--allow-dropdown input,
.iti--allow-dropdown input[type=text],
.iti--allow-dropdown input[type=tel],
.iti--allow-dropdown input[type=password] {
    padding-right: 6px;
    padding-left: 52px;
    margin-left: 0;
}

@media (max-width: 480px) {
    .iti--allow-dropdown input,
    .iti--allow-dropdown input[type=text],
    .iti--allow-dropdown input[type=tel],
    .iti--allow-dropdown input[type=password] {
        padding-right: 4px;
        padding-left: 44px;
    }
}
