/* ==========================================================
   عيادة د. بدر الكميم - بطاقة الطبيب الرقمية (Digital VIP Card)
   شارة جانبية فاخرة + بطاقة منزلقة بتصميم VIP ملكي
========================================================== */

/* 1. الشارة الجانبية العائمة (منتصف الجانب الأيمن) */
.doctor-badge-trigger {
  position: fixed;
  top: 50%;
  right: 0 !important;
  left: auto !important;
  transform: translateY(-50%);
  z-index: 995;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: rgba(10, 28, 68, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-right: none !important;
  border-radius: 18px 0 0 18px;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: -6px 12px 35px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  outline: none;
  user-select: none;
}

.doctor-badge-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: transform 0.35s ease, background 0.3s ease;
}

.doctor-badge-icon svg {
  width: 16px;
  height: 16px;
  stroke: #FFFFFF;
}

.doctor-badge-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Alexandria", "Tajawal", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #FFFFFF;
}

.doctor-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38ef7d;
  box-shadow: 0 0 8px #38ef7d;
  animation: badgeDotPulse 2s infinite ease-in-out;
}

@keyframes badgeDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.doctor-badge-trigger:hover,
.doctor-badge-trigger:focus-visible {
  transform: translateY(-50%) translateX(-6px);
  background: #122A6B;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: -10px 18px 45px rgba(9, 26, 56, 0.6), 0 0 20px rgba(18, 42, 107, 0.5);
}

.doctor-badge-trigger:hover .doctor-badge-icon {
  transform: rotate(-10deg) scale(1.1);
  background: #FFFFFF;
  color: #0A1C44;
}

.doctor-badge-trigger:hover .doctor-badge-icon svg {
  stroke: #0A1C44;
}

/* 2. نافذة البطاقة المنزلقة من اليمين (Modal & Backdrop) */
.doctor-card-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.35s ease;
}

.doctor-card-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.doctor-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 14, 32, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.doctor-card-modal.is-open .doctor-card-backdrop {
  opacity: 1;
}

/* القائمة المنزلقة: مثبتة في اليمين دائماً وتخرج وتدخل من اليمين بسلاسة */
.doctor-card-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0 !important;
  left: auto !important;
  z-index: 2;
  width: min(100vw, 395px);
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(165deg, #0c2054 0%, #081634 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  border-right: none;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.7);
  padding: 16px 18px 24px;
  display: flex;
  flex-direction: column;
  transform: translate3d(100%, 0, 0) !important;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1) !important;
  color: #FFFFFF;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.doctor-card-modal.is-open .doctor-card-drawer {
  transform: translate3d(0, 0, 0) !important;
}

/* شريط رأس البطاقة المنزلقة */
.doctor-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}

.doctor-card-top-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}

.doctor-card-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  outline: none;
}

.doctor-card-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}

/* 3. هيكل البطاقة الرقمية VIP (مضبوطة لتظهر كاملة 100% بدون قص) */
.vip-pass-card {
  position: relative;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 75%),
              linear-gradient(180deg, rgba(18, 42, 107, 0.65) 0%, rgba(9, 26, 56, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  padding: 16px 16px 14px;
  text-align: center;
  overflow: hidden;
}

.vip-clinic-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3.5px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 10.5px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.vip-avatar-wrap {
  position: relative;
  width: 66px;
  height: 66px;
  margin: 0 auto 8px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.2));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.vip-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #091A38;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vip-avatar-inner svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #FFFFFF;
}

.vip-doctor-name {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 2px;
  letter-spacing: -0.3px;
}

.vip-doctor-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  margin: 0 0 6px;
}

.vip-clinic-motto {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 4.5px 12px;
  margin-bottom: 12px;
  display: inline-block;
}

/* 4. الزر السحري: حفظ جهة الاتصال في الهاتف بنقرة واحدة */
.btn-vip-save-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: #FFFFFF;
  color: #0A1C44;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              background 0.2s ease;
  outline: none;
  margin-bottom: 10px;
}

.btn-vip-save-contact:hover {
  transform: translateY(-2px) scale(1.02);
  background: #F0F4FC;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.btn-vip-save-contact:active {
  transform: scale(0.98);
}

.btn-vip-save-contact svg {
  width: 18px;
  height: 18px;
  stroke: #0A1C44;
  fill: none;
}

/* 5. أزرار الإجراء السريع (واتساب، اتصال، لوكيشن) */
.vip-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.vip-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.vip-action-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
  border-color: #FFFFFF;
}

.vip-action-btn svg {
  width: 17px;
  height: 17px;
  stroke: #FFFFFF;
  fill: none;
}

.vip-action-btn.whatsapp-btn:hover {
  background: #25D366;
  border-color: #25D366;
  color: #FFFFFF;
}

.vip-action-btn.whatsapp-btn:hover svg {
  stroke: #FFFFFF;
}

/* 6. صندوق الباركود المدمج */
.vip-qr-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
}

.vip-qr-thumb {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vip-qr-thumb img {
  width: 100%;
  height: 100%;
  display: block;
}

.vip-qr-text strong {
  display: block;
  font-size: 12px;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.vip-qr-text p {
  margin: 0;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
}

/* تذييل البطاقة */
.vip-card-footer {
  margin-top: 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  line-height: 1.45;
}

/* شاشات الجوال */
@media (max-width: 600px) {
  .doctor-badge-trigger {
    padding: 12px 8px;
    gap: 6px;
  }
  .doctor-badge-text {
    font-size: 11px;
  }
  .doctor-badge-icon {
    width: 26px;
    height: 26px;
  }
  .doctor-badge-icon svg {
    width: 13px;
    height: 13px;
  }
  .doctor-card-drawer {
    width: 100vw;
    padding: 14px 14px 20px;
  }
}
