/* پروفایل عمومی پزشک — دیزاین موبایل (الهام از کارت رزرو پزشکی) */
@media (max-width: 991.98px) {
  .dr-profile-page {
    --dr-teal: var(--landing-primary, #007982);
    --dr-teal-dark: var(--landing-primary-dark, #005f66);
    --dr-surface: #f4f7f8;
    background: var(--dr-surface);
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .dr-profile-page .landing-navbar,
  .dr-profile-page .landing-hero {
    display: none !important;
  }

  /* هدر شناور — بدون نوار سایت */
  .dr-mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
    pointer-events: none;
  }

  .dr-mobile-header__btn {
    pointer-events: auto;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .dr-mobile-header__btn:active {
    transform: scale(0.92);
  }

  .dr-mobile-header__btn.is-fav {
    background: rgba(255, 255, 255, 0.95);
    color: #ef4444;
  }

  /* هیرو — پرتره کامل در قاب جمع‌وجور (نه تمام‌عرض) */
  .dr-mobile-hero {
    position: relative;
    background: linear-gradient(165deg, var(--dr-teal-dark) 0%, var(--dr-teal) 55%, #0a4f55 100%);
    overflow: hidden;
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .dr-mobile-hero__photo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(54px + env(safe-area-inset-top, 0px)) 20px 10px;
  }

  .dr-mobile-hero__photo {
    width: 156px;
    height: 196px;
    max-width: 42vw;
    object-fit: contain;
    object-position: center center;
    border-radius: 18px;
    border: 3px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.06);
  }

  .dr-mobile-hero__shade {
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    background: linear-gradient(to top, rgba(0, 40, 45, 0.55) 0%, transparent 100%);
    pointer-events: none;
  }

  .dr-mobile-hero__body {
    position: relative;
    z-index: 2;
    padding: 6px 20px 10px;
    color: #fff;
    text-align: center;
  }

  .dr-mobile-hero__name {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 0 0 4px;
    line-height: 1.35;
  }

  .dr-mobile-hero__spec {
    font-size: 0.92rem;
    opacity: 0.88;
    margin: 0 0 10px;
  }

  .dr-mobile-hero__rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: 700;
  }

  .dr-mobile-hero__rating svg {
    color: #fbbf24;
  }

  .dr-mobile-hero__actions {
    position: absolute;
    left: 16px;
    top: calc(52px + env(safe-area-inset-top, 0px));
    bottom: auto;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .dr-mobile-hero__action {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--dr-teal);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s ease;
  }

  .dr-mobile-hero__action:active {
    transform: scale(0.9);
  }

  /* کارت آمار — بدون پوشاندن چهره پزشک */
  .dr-stats-card {
    position: relative;
    z-index: 5;
    margin: 8px 16px 0;
    background: #fff;
    border-radius: 22px 22px 16px 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 16px 8px;
    text-align: center;
    animation: drSlideUp 0.45s ease both;
  }

  .dr-stats-card__item {
    padding: 0 4px;
  }

  .dr-stats-card__icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--dr-teal) 12%, white);
    color: var(--dr-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
  }

  .dr-stats-card__val {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
  }

  .dr-stats-card__lbl {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 2px;
  }

  /* چیدمان — رزرو بالاتر از درباره */
  .dr-profile-page .container.pb-5 {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0 !important;
  }

  .dr-profile-page .container.pb-5 > .row {
    flex-direction: column;
    margin: 0;
  }

  .dr-profile-page .col-lg-4 {
    order: 1;
    width: 100%;
    padding: 0;
  }

  .dr-profile-page .col-lg-8 {
    order: 2;
    width: 100%;
    padding: 0 16px 24px;
  }

  .dr-profile-page .booking-card,
  .dr-profile-page .live-instant-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 12px 16px 8px !important;
    position: static !important;
  }

  .dr-profile-page .booking-card > .mb-2:first-child h5 {
    display: none;
  }

  .dr-profile-page .booking-card > .mb-2:first-child p {
    display: none;
  }

  .dr-profile-page .booking-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 18px 0 10px;
  }

  /* ماه‌ها */
  .dr-month-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dr-month-strip::-webkit-scrollbar {
    display: none;
  }

  .dr-month-pill {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    scroll-snap-align: start;
    transition: all 0.25s ease;
  }

  .dr-month-pill.active {
    background: color-mix(in srgb, var(--dr-teal) 14%, white);
    color: var(--dr-teal);
    font-weight: 800;
  }

  /* روزها — کارت عمودی انتخاب‌شده */
  .dr-profile-page .day-chips-carousel {
    gap: 0;
  }

  .dr-profile-page .day-chips-nav {
    display: none;
  }

  .dr-profile-page .day-chips-viewport {
    overflow: visible;
  }

  .dr-profile-page .day-chips-row {
    align-items: flex-end;
    gap: 10px;
    padding: 8px 4px 16px;
    scroll-snap-type: x mandatory;
    min-height: 110px;
  }

  .dr-profile-page .day-chip {
    min-width: 52px;
    padding: 10px 6px;
    border: none;
    background: transparent;
    border-radius: 14px;
    transition: all 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
    transform: scale(0.92);
    opacity: 0.55;
  }

  .dr-profile-page .day-chip .chip-rel,
  .dr-profile-page .day-chip .chip-mon {
    display: none;
  }

  .dr-profile-page .day-chip .chip-dom {
    font-size: 1.1rem;
    font-weight: 700;
    color: #64748b;
  }

  .dr-profile-page .day-chip .chip-dow {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
  }

  .dr-profile-page .day-chip.active {
    min-width: 72px;
    padding: 14px 10px 18px;
    background: var(--dr-teal);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--dr-teal) 45%, transparent);
    transform: scale(1);
    opacity: 1;
    position: relative;
    animation: drDayPop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  }

  .dr-profile-page .day-chip.active .chip-dom,
  .dr-profile-page .day-chip.active .chip-dow {
    color: #fff;
  }

  .dr-profile-page .day-chip.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    animation: drDotPulse 1.2s ease infinite;
  }

  /* ساعت‌ها — pill افقی */
  .dr-profile-page .slots-grid-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 6px 0 12px;
  }

  .dr-profile-page #slots-container {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dr-profile-page #slots-container::-webkit-scrollbar {
    display: none;
  }

  .dr-profile-page #slots-container > .col-4,
  .dr-profile-page #slots-container > [class*='col-'] {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none;
    padding: 0 !important;
  }

  .dr-profile-page .time-slot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: all 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
    background: #fff;
  }

  .dr-profile-page .time-slot::before {
    content: '';
    width: 14px;
    height: 14px;
    background: currentColor;
    opacity: 0.55;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center/contain no-repeat;
  }

  .dr-profile-page .time-slot.bg-primary,
  .dr-profile-page .time-slot.active {
    background: color-mix(in srgb, var(--dr-teal) 12%, white) !important;
    border-color: var(--dr-teal) !important;
    color: var(--dr-teal) !important;
    transform: scale(1.04);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--dr-teal) 25%, transparent);
  }

  .dr-profile-page .time-slot.booked {
    opacity: 0.45;
  }

  .dr-profile-page #booking-form .btn-booking-primary,
  .dr-profile-page #login-to-book {
    display: none !important;
  }

  .dr-profile-page .col-lg-8 .bg-white {
    border-radius: 16px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
  }

  .dr-profile-page #landingGalleryCarousel {
    margin: 12px 16px;
    border-radius: 16px !important;
  }

  /* نوار پایین رزرو */
  .dr-mobile-book-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, #fff 75%, rgba(255, 255, 255, 0));
    pointer-events: none;
  }

  .dr-mobile-book-bar__btn {
    pointer-events: auto;
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    background: var(--dr-teal);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--dr-teal) 40%, transparent);
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1.3;
  }

  .dr-mobile-book-bar__btn:disabled {
    opacity: 0.45;
    box-shadow: none;
  }

  .dr-mobile-book-bar__btn:not(:disabled):active {
    transform: scale(0.98);
  }

  .dr-mobile-book-bar__price {
    font-weight: 600;
    opacity: 0.92;
    font-size: 0.88rem;
  }

  @keyframes drSlideUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes drDayPop {
    from { transform: scale(0.85); opacity: 0.6; }
    to { transform: scale(1); opacity: 1; }
  }

  @keyframes drDotPulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.5; transform: translateX(-50%) scale(0.7); }
  }

  @media (prefers-reduced-motion: reduce) {
    .dr-stats-card,
    .dr-profile-page .day-chip.active,
    .dr-profile-page .time-slot {
      animation: none !important;
      transition: none !important;
    }
  }
}

/* فول‌اسکرین PWA — بدون padding اضافه */
@media (max-width: 991.98px) {
  @media (display-mode: standalone), (display-mode: fullscreen) {
    .dr-profile-page {
      padding-top: 0;
    }
  }
}

@media (min-width: 992px) {
  .dr-mobile-header,
  .dr-mobile-hero,
  .dr-stats-card,
  .dr-mobile-book-bar,
  .dr-month-strip-wrap,
  .booking-section-title {
    display: none !important;
  }
}
