/**
 * Doctor profile sidebar â€” rating + share engagement
 *
 * @package aldoctorz-theme
 */

.doctor-profile-engagement {
    --dpe-ink: #0a305e;
    --dpe-ink-soft: #1e3a5f;
    --dpe-muted: #64748b;
    --dpe-accent: #34c3db;
    --dpe-gold: #f5b301;
    --dpe-surface: #f8fafc;
    --dpe-border: #e6ecf0;
    --dpe-radius: 14px;
    margin-top: 1.25rem;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: start;
}

.doctor-profile-engagement__divider {
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--dpe-border) 15%,
            var(--dpe-border) 85%,
            transparent 100%);
    margin-bottom: 0.15rem;
}

/* Rating */
.doctor-rating {
    padding: 11px;
    border-radius: var(--dpe-radius);
    background: linear-gradient(145deg, #fff 0%, var(--dpe-surface) 100%);
    border: 1px solid var(--dpe-border);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .doctor-rating:hover {
        box-shadow: 0 0px 5px rgba(10, 48, 94, 0.12);
        transform: translateY(-1px);
    }
}

.doctor-rating__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.doctor-rating__stars {
    --doctor-rating: 0;
    position: relative;
    display: inline-block;
    font-size: 25px;
    line-height: 1;
    letter-spacing: 0.14em;
    flex-shrink: 0;
}

.doctor-rating__stars-bg {
    color: #e2e8f0;
}

.doctor-rating__stars-fill {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: calc(var(--doctor-rating) / 5 * 100%);
    overflow: hidden;
    color: var(--dpe-gold);
    white-space: nowrap;
    pointer-events: none;
}

.doctor-rating__meta {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.doctor-rating__value {
    font-weight: 700;
    color: var(--dpe-ink);
    line-height: 1.2;
}

.doctor-rating__value-num {
    font-size: 1.15rem;
}

.doctor-rating__value-max {
    font-size: 0.9rem;
    color: var(--dpe-muted);
    font-weight: 600;
}

.doctor-rating__reviews,
.doctor-rating__label {
    font-size: 0.82rem;
    color: var(--dpe-muted);
    font-weight: 500;
}

/* Share */
.doctor-share {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    position: relative;
}

.doctor-share__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.doctor-share__lead {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--dpe-ink-soft);
    line-height: 1.45;
}

.doctor-share__trigger {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.35rem;
    padding: 0 0.85rem;
    border: 1px solid var(--dpe-border);
    border-radius: 999px;
    color: var(--dpe-ink);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.doctor-share__trigger i {
    font-size: 0.95rem;
}

.doctor-share.is-share-open .doctor-share__trigger {
    border-color: var(--dpe-accent);
    color: var(--dpe-accent);
    box-shadow: 0 6px 18px rgba(52, 195, 219, 0.22);
}

@media (prefers-reduced-motion: no-preference) {

    .doctor-share__trigger:hover,
    .doctor-share__trigger:focus-visible {
        transform: translateY(-2px);
        box-shadow: 0 0px 5px rgba(10, 48, 94, 0.12);
    }
}

.doctor-share__trigger:focus-visible {
    outline: 2px solid var(--dpe-accent);
    outline-offset: 2px;
}

.doctor-share__popup {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.doctor-share__popup[hidden] {
    display: none;
}

.doctor-share__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgb(74 74 74 / 42%);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.doctor-share__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 20rem);
    padding: 13px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e1e1e1;
    box-shadow: 0 22px 55px rgba(10, 48, 94, 0.2);
    animation: doctorSharePopupIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .doctor-share__panel {
        animation: none;
    }
}

@keyframes doctorSharePopupIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.doctor-share__panel-close {
    position: absolute;
    top: 0.55rem;
    inset-inline-end: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e9e9e9;
    color: var(--dpe-muted);
    cursor: pointer;
}

.doctor-share__panel-title {
    margin: 0 0 1rem;
    padding-inline-end: 2rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dpe-ink);
    text-align: start;
}

.doctor-share__icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.doctor-share.is-share-open .doctor-share__icon {
    animation: doctorShareIconIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.doctor-share.is-share-open .doctor-share__icon:nth-child(1) {
    animation-delay: 0.04s;
}

.doctor-share.is-share-open .doctor-share__icon:nth-child(2) {
    animation-delay: 0.08s;
}

.doctor-share.is-share-open .doctor-share__icon:nth-child(3) {
    animation-delay: 0.12s;
}

.doctor-share.is-share-open .doctor-share__icon:nth-child(4) {
    animation-delay: 0.16s;
}

.doctor-share.is-share-open .doctor-share__icon:nth-child(5) {
    animation-delay: 0.2s;
}

.doctor-share.is-share-open .doctor-share__icon:nth-child(6) {
    animation-delay: 0.24s;
}

.doctor-share.is-share-open .doctor-share__icon:nth-child(7) {
    animation-delay: 0.28s;
}

.doctor-share.is-share-open .doctor-share__icon:nth-child(8) {
    animation-delay: 0.32s;
}

@keyframes doctorShareIconIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.doctor-share__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #ebebeb;
    background: #fff;
    color: #717171;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {

    .doctor-share__icon:hover,
    .doctor-share__icon:focus-visible {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 10px 22px rgba(10, 48, 94, 0.14);
    }
}

.doctor-share__icon:focus-visible {
    outline: 2px solid var(--dpe-accent);
    outline-offset: 2px;
}

.doctor-share__icon--whatsapp:hover,
.doctor-share__icon--whatsapp:focus-visible {
    border-color: #25d366;
    color: #fff;
    background: #25d366;
}

.doctor-share__icon--facebook:hover,
.doctor-share__icon--facebook:focus-visible {
    border-color: #1877f2;
    color: #fff;
    background: #1877f2;
}

.doctor-share__icon--x {
    color: #0f1419;
}

.doctor-share__x-logo {
    display: block;
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
}

.doctor-share__icon--x:hover,
.doctor-share__icon--x:focus-visible {
    border-color: #0f1419;
    color: #fff;
    background: #0f1419;
}

.doctor-share__icon--x:hover .doctor-share__x-logo path,
.doctor-share__icon--x:focus-visible .doctor-share__x-logo path {
    fill: #fff;
}

.doctor-share__icon--tiktok:hover,
.doctor-share__icon--tiktok:focus-visible {
    border-color: #010101;
    color: #fff;
    background: #010101;
}

.doctor-share__icon--linkedin:hover,
.doctor-share__icon--linkedin:focus-visible {
    border-color: #0a66c2;
    color: #fff;
    background: #0a66c2;
}

.doctor-share__icon--telegram:hover,
.doctor-share__icon--telegram:focus-visible {
    border-color: #229ed9;
    color: #fff;
    background: #229ed9;
}

.doctor-share__icon--copy:hover,
.doctor-share__icon--copy:focus-visible {
    border-color: var(--dpe-accent);
    color: var(--dpe-ink);
    background: #f0fdfa;
}

.doctor-share__icon--native:hover,
.doctor-share__icon--native:focus-visible {
    border-color: var(--dpe-ink);
    color: #fff;
    background: var(--dpe-ink);
}

body.doctor-share-popup-open {
    overflow: hidden;
}

.doctor-share__toast {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f766e;
    min-height: 1.2em;
}

.doctor-share__toast[hidden] {
    display: none;
}

#aboutDoctorWebView .doctor-profile-engagement,
#aboutDoctorMobView .doctor-profile-engagement {
    margin-inline: 0;
}

@media (max-width: 575px) {
    .doctor-share__trigger-text {
        display: none;
    }

    .doctor-share__trigger {
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        border-radius: 50%;
    }

    .doctor-share__icon {
        width: 2.55rem;
        height: 2.55rem;
    }
}