/* WhatsApp beside phone numbers */
.tz-phone-with-wa {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    max-width: 100%;
}
.tz-phone-with-wa .tz-phone {
    white-space: nowrap;
}
.tz-wa-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: #25D366;
    color: #fff !important;
    text-decoration: none !important;
    flex-shrink: 0;
    line-height: 1;
    transition: transform .15s ease, box-shadow .15s ease;
}
.tz-wa-link:hover,
.tz-wa-link:focus {
    color: #fff !important;
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.28);
}
.tz-wa-link .bi-whatsapp {
    font-size: 0.95rem;
}
.tz-phone-line {
    margin-top: 2px;
}
.tz-phone-line__label {
    color: #80868b;
    font-size: 12px;
}

/* رقمٌ يحمل data-student-id هو زرّ «كل الأرقام» */
.tz-phone[data-student-id],
[data-student-id] > .tz-phone {
    cursor: pointer;
    text-decoration: underline dotted rgba(128, 134, 139, 0.6);
    text-underline-offset: 3px;
}

/* أيقونة الاتصال — بديل الرقم + واتساب في القوائم (قرار صاحب المشروع ٢٠٢٦-٠٩) */
.tz-phone-call,
.tz-phone-call[data-student-id] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    /* أخضر (طلب صاحب المشروع) — لون Metronic success. */
    background: rgba(80, 205, 137, 0.15);
    color: #47be7d;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease;
    vertical-align: middle;
}
.tz-phone-call:hover,
.tz-phone-call:focus {
    background: rgba(80, 205, 137, 0.28);
    color: #47be7d;
    transform: scale(1.08);
}
.tz-phone-call .bi {
    font-size: 0.95rem;
    line-height: 1;
}

/* نسخة مصغّرة — بجانب الاسم في سطره نفسه داخل صفوف الجداول */
/* الاسم وأيقونة الاتصال في سطرٍ واحد (خلايا الاسم وعناوين الكروت في التقارير). */
.tz-name-call {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  max-width: 100%;
}

.tz-phone-call--sm {
    width: 1.6rem;
    height: 1.6rem;
    flex-shrink: 0;
}
.tz-phone-call--sm .bi {
    font-size: 0.75rem;
}

/* رقم «مكشوف» بأزراره (نسخ/اتصال/واتساب) — صفحتا «بياناتي» و«بيانات التلميذ» فقط */
.tz-phone-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.tz-phone-inline__num {
    font-weight: 600;
    white-space: nowrap;
    unicode-bidi: isolate;
}
.tz-phone-inline__acts {
    display: inline-flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* قائمة «كل أرقام التلميذ» */
.tz-phone-pop {
    position: fixed;
    z-index: 1090;
    min-width: 230px;
    max-width: 320px;
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0.65rem;
}
.tz-phone-pop__title {
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.15rem 0.25rem 0.4rem;
    border-bottom: 1px solid #eff2f5;
    margin-bottom: 0.35rem;
    text-align: center;
}
.tz-phone-pop__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.3rem 0.25rem;
}
.tz-phone-pop__row + .tz-phone-pop__row {
    border-top: 1px dashed #eff2f5;
}
.tz-phone-pop__label {
    color: #80868b;
    font-size: 11px;
}
.tz-phone-pop__num {
    font-weight: 600;
    white-space: nowrap;
}
.tz-phone-pop__acts {
    display: inline-flex;
    gap: 0.35rem;
    flex-shrink: 0;
}
.tz-phone-pop__act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: #009ef7;
    color: #fff !important;
    text-decoration: none !important;
    line-height: 1;
    /* الزر (النسخ) يشارك الروابط نفس الشكل — تصفير افتراضيات button. */
    border: 0;
    padding: 0;
    cursor: pointer;
}
.tz-phone-pop__act--wa {
    background: #25D366;
}
.tz-phone-pop__act--copy {
    background: #7e8299;
}
.tz-phone-pop__act:hover {
    transform: scale(1.08);
    color: #fff !important;
}

/* Phone field with a country-code select (profile, student and registration
   forms). The forms cap the select at 130px inline, which on a phone cuts the
   country name off mid-word, so there the select takes its own full line and
   the number goes under it. */
@media (max-width: 575.98px) {
    .input-group > select[name^="CountryCode"],
    .input-group > select[name^="CountryCode"] ~ .form-control {
        flex: 1 1 100%;
        width: 100%;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 0.475rem !important;
    }
    .input-group > select[name^="CountryCode"] ~ .form-control {
        margin-top: 0.5rem !important;
    }
}
