/* Mobile Doctor Profile Page Styles with Smooth Transitions */

@keyframes doctorFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes doctorAvatarPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(29, 204, 112, 0.55);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(29, 204, 112, 0);
    }
}

.doctor-reveal {
    animation: doctorFadeSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.doctor-reveal-delay-1 { animation-delay: 0.05s; }
.doctor-reveal-delay-2 { animation-delay: 0.11s; }
.doctor-reveal-delay-3 { animation-delay: 0.17s; }
.doctor-reveal-delay-4 { animation-delay: 0.23s; }
.doctor-reveal-delay-5 { animation-delay: 0.29s; }

/* Hero Profile Card */
.doctor-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #e5e9f2;
    background: #ffffff;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s ease;
}

body.dark-mode-active .doctor-hero-card {
    background: linear-gradient(155deg, #132746 0%, #0F1C2F 62%, #0d1829 100%);
    border-color: #1B283B;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.doctor-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}

.doctor-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: #f4f7fb;
    color: #141515;
    border: 1px solid #e1e6ef;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

body.dark-mode-active .doctor-back-btn {
    background: rgba(12, 22, 36, 0.65);
    color: #cbd7e3;
    border-color: rgba(255, 255, 255, 0.1);
}

.doctor-back-btn:hover,
.doctor-back-btn:active {
    transform: translateX(2px);
    border-color: #1E74FD;
    color: #ffffff;
}

.doctor-code-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(30, 116, 253, 0.15);
    color: #6ea8ff;
    border: 1px solid rgba(30, 116, 253, 0.28);
}

.doctor-profile-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.doctor-avatar-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E74FD 0%, #1DCC70 100%);
    margin-bottom: 12px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.doctor-hero-card:hover .doctor-avatar-wrap {
    transform: scale(1.03);
}

.doctor-avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #0F1C2F;
}

.doctor-status-dot {
    position: absolute;
    bottom: 6px;
    left: 6px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #1DCC70;
    border: 3px solid #0F1C2F;
    animation: doctorAvatarPulse 2.2s infinite;
}

.doctor-name {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #141515;
}

body.dark-mode-active .doctor-name {
    color: #ffffff;
}

.doctor-speciality-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.doctor-speciality-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(30, 116, 253, 0.16);
    color: #7ab2ff;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.doctor-speciality-chip:hover {
    background: #1E74FD;
    color: #ffffff;
    transform: translateY(-1px);
}

.doctor-quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid #e5e9f2;
}

body.dark-mode-active .doctor-quick-stats {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.doctor-quick-stat {
    padding: 8px 6px;
    border-radius: 10px;
    background: #f4f7fb;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

body.dark-mode-active .doctor-quick-stat {
    background: rgba(12, 22, 36, 0.55);
}

.doctor-quick-stat:hover {
    transform: translateY(-2px);
}

.doctor-quick-stat .num {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #141515;
}

body.dark-mode-active .doctor-quick-stat .num {
    color: #ffffff;
}

.doctor-quick-stat .lbl {
    display: block;
    font-size: 11px;
    color: #8195a6;
}

/* Info & Section Cards */
.doctor-card {
    border-radius: 14px;
    border: 1px solid #e5e9f2;
    overflow: hidden;
    transition: border-color 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

body.dark-mode-active .doctor-card {
    background: #0F1C2F;
    border-color: #1B283B;
}

.doctor-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e9f2;
    font-size: 14px;
    font-weight: 700;
    color: #141515;
}

body.dark-mode-active .doctor-card-header {
    border-bottom-color: #1B283B;
    color: #ffffff;
}

.doctor-card-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doctor-card-header-title i {
    color: #1E74FD;
    font-size: 16px;
}

/* Info List Rows */
.doctor-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doctor-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e9f2;
    transition: background-color 0.18s ease;
}

body.dark-mode-active .doctor-info-row {
    border-bottom-color: #1B283B;
}

.doctor-info-row:last-child {
    border-bottom: 0;
}

.doctor-info-row:hover {
    background: rgba(30, 116, 253, 0.05);
}

.doctor-info-key {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #8195a6;
}

.doctor-info-key i {
    color: #1E74FD;
    font-size: 15px;
}

.doctor-info-val {
    font-size: 13px;
    font-weight: 600;
    color: #141515;
    text-align: left;
}

body.dark-mode-active .doctor-info-val {
    color: #ffffff;
}

/* Expandable About Section with Smooth Max-Height Transition */
.doctor-about-body {
    font-size: 13px;
    line-height: 1.95;
    text-align: justify;
    color: #4f5050;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

body.dark-mode-active .doctor-about-body {
    color: #b7c6d4;
}

.doctor-about-body.is-collapsed {
    max-height: 130px;
    -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
}

.doctor-about-body.is-expanded {
    max-height: 1500px;
    -webkit-mask-image: none;
    mask-image: none;
}

.doctor-about-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(30, 116, 253, 0.14);
    color: #5fa0ff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.doctor-about-toggle:hover {
    background: rgba(30, 116, 253, 0.24);
}

.doctor-about-toggle i {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.doctor-about-toggle.is-open i {
    transform: rotate(180deg);
}

/* Services Pills */
.doctor-services-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doctor-service-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: #f4f7fb;
    border: 1px solid #e1e6ef;
    color: #141515;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease;
}

body.dark-mode-active .doctor-service-chip {
    background: #14243d;
    border-color: #1f3352;
    color: #d6e2ee;
}

.doctor-service-chip:hover,
.doctor-service-chip:active {
    transform: translateY(-2px);
    background: #1E74FD;
    border-color: #1E74FD;
    color: #ffffff;
}

/* Places List Items */
.doctor-place-item {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.doctor-place-item:active {
    transform: scale(0.99);
}

.doctor-place-sub {
    font-size: 11px;
    color: #8195a6;
    margin-top: 2px;
}

/* Consultations */
.doctor-consult-card {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e5e9f2;
    background: #f8fafd;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

body.dark-mode-active .doctor-consult-card {
    background: #13233b;
    border-color: #1e3250;
}

.doctor-consult-card + .doctor-consult-card {
    margin-top: 10px;
}

.doctor-consult-card:hover {
    border-color: rgba(30, 116, 253, 0.5);
    transform: translateY(-1px);
}

.doctor-consult-price {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(29, 204, 112, 0.15);
    color: #1DCC70;
}

.doctor-consult-title {
    font-size: 13px;
    font-weight: 700;
    color: #141515;
}

body.dark-mode-active .doctor-consult-title {
    color: #ffffff;
}

.doctor-consult-desc {
    font-size: 12px;
    line-height: 1.7;
    color: #8195a6;
}

/* Related Doctors Carousel */
.doctor-related-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e9f2;
    height: 100%;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease;
}

body.dark-mode-active .doctor-related-card {
    background: #0F1C2F;
    border-color: #1B283B;
}

.doctor-related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(30, 116, 253, 0.45);
}

.doctor-related-media {
    height: 130px;
    overflow: hidden;
    background: #13233b;
    display: block;
}

.doctor-related-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.doctor-related-card:hover .doctor-related-media img {
    transform: scale(1.06);
}

.doctor-related-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctor-related-name a {
    color: inherit;
}

.doctor-related-meta {
    font-size: 11px;
    color: #8195a6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
    .doctor-reveal,
    .doctor-status-dot {
        animation: none;
    }

    .doctor-hero-card,
    .doctor-back-btn,
    .doctor-avatar-wrap,
    .doctor-speciality-chip,
    .doctor-quick-stat,
    .doctor-card,
    .doctor-info-row,
    .doctor-about-body,
    .doctor-about-toggle,
    .doctor-about-toggle i,
    .doctor-service-chip,
    .doctor-place-item,
    .doctor-consult-card,
    .doctor-related-card,
    .doctor-related-media img {
        transition: none;
    }
}
