/* Pahad Calling - Story Reader Component */
.pc-story-open-trigger {
    cursor: pointer;
}

.pc-story-open-trigger:focus-visible {
    outline: 3px solid rgba(48, 75, 53, 0.36);
    outline-offset: 6px;
}

.pc-stories-card-v2.pc-story-open-trigger,
.pc-stories-featured-v2.pc-story-open-trigger {
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.pc-stories-card-v2.pc-story-open-trigger:hover,
.pc-stories-featured-v2.pc-story-open-trigger:hover {
    transform: translateY(-4px);
}

.pc-stories-card-v2__stats,
.pc-stories-meta-v2,
.pc-stories-reactions-v2,
.pc-stories-card-v2__meta {
    color: rgba(24, 51, 31, 0.78) !important;
    font-weight: 750;
}

.pc-stories-card-v2__body h3,
.pc-stories-featured-v2__content h2,
.pc-stories-latest-v2__head h2 {
    color: #17311d !important;
    font-weight: 900 !important;
    letter-spacing: -0.035em;
}

.pc-stories-featured-v2__content p,
.pc-stories-latest-v2__head p {
    color: rgba(24, 51, 31, 0.82) !important;
    font-weight: 650;
}

.pc-story-reader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    padding: clamp(0.75rem, 2vw, 1.4rem);
    cursor: auto;
}

.pc-story-reader.is-open {
    display: grid;
    place-items: center;
}

.pc-story-reader__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 16, 11, 0.72);
    backdrop-filter: blur(10px);
}

.pc-story-reader__shell {
    position: relative;
    z-index: 1;
    width: min(1060px, 100%);
    max-height: min(90vh, 920px);
    overflow: hidden;
    border-radius: 32px;
    background: #fbf8ef;
    box-shadow: 0 34px 120px rgba(0, 0, 0, 0.38);
    display: grid;
    grid-template-rows: auto 1fr auto;
    border: 1px solid rgba(255, 255, 255, 0.62);
    isolation: isolate;
    cursor: auto;
}

.pc-story-reader__progress {
    position: absolute;
    inset: 0 0 auto;
    z-index: 7;
    height: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

.pc-story-reader__progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, #e8651a, #f3aa59);
    box-shadow: 0 0 14px rgba(232, 101, 26, 0.55);
    transition: width 100ms linear;
}

.pc-story-reader__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(19, 49, 28, 0.96);
    color: #fff;
    cursor: pointer;
    font-size: 1.55rem;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    transition: transform 160ms ease, background 160ms ease;
}

.pc-story-reader__close:hover {
    transform: rotate(4deg) scale(1.05);
    background: #e8651a;
}

.pc-story-reader__hero {
    position: relative;
    min-height: clamp(260px, 34vh, 360px);
    background: #253525;
    overflow: hidden;
}

.pc-story-reader__hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pc-story-reader__hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.62) 100%),
        linear-gradient(90deg, rgba(13,36,19,0.54) 0%, rgba(13,36,19,0.08) 62%);
}

.pc-story-reader__hero-copy {
    position: relative;
    z-index: 2;
    min-height: clamp(260px, 34vh, 360px);
    padding: clamp(1.3rem, 4vw, 2.4rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 820px;
}

.pc-story-reader__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.pc-story-reader__meta span {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 30px;
    padding: 0.34rem 0.68rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #213d29;
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    overflow-wrap: anywhere;
}

.pc-story-reader__title {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
    font-weight: 950;
    text-wrap: balance;
    text-shadow: 0 8px 32px rgba(0,0,0,0.32);
    overflow-wrap: anywhere;
}

.pc-story-reader__scroll {
    overflow: auto;
    padding: clamp(1.2rem, 4vw, 2.4rem) clamp(1rem, 5vw, 3rem) 2rem;
    scrollbar-color: rgba(48, 75, 53, 0.35) transparent;
    scrollbar-width: thin;
}

.pc-story-reader__article {
    width: min(760px, 100%);
    margin: 0 auto;
}

.pc-story-reader__excerpt {
    margin: 0 0 1.45rem;
    padding: 1.1rem 1.2rem;
    border-left: 4px solid rgba(48, 75, 53, 0.45);
    border-radius: 18px;
    background: rgba(48, 75, 53, 0.07);
    color: rgba(25, 48, 31, 0.84);
    font-size: clamp(1.03rem, 1.8vw, 1.18rem);
    line-height: 1.72;
    font-weight: 750;
}

.pc-story-reader__body {
    color: rgba(19, 40, 24, 0.92);
    font-size: clamp(1.02rem, 1.6vw, 1.12rem);
    line-height: 1.92;
    font-weight: 520;
    overflow-wrap: anywhere;
}

.pc-story-reader__body p {
    margin: 0 0 1.25rem;
}

.pc-story-reader__comments {
    margin-top: 2rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(48, 75, 53, 0.15);
}

.pc-story-reader__comments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pc-story-reader__comments-head h3 {
    margin: 0;
    color: #17311d;
    font-size: 1.35rem;
    letter-spacing: -0.025em;
}

.pc-story-reader__section-label {
    display: block;
    margin-bottom: 0.28rem;
    color: #e8651a;
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.pc-story-reader__comments-head > span {
    flex: 0 0 auto;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: rgba(48, 75, 53, 0.08);
    color: rgba(23, 49, 29, 0.72);
    font-size: 0.78rem;
    font-weight: 800;
}

.pc-story-reader__comment-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pc-story-reader__comment {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(48, 75, 53, 0.10);
    box-shadow: 0 9px 24px rgba(23, 49, 29, 0.045);
}

.pc-story-reader__comment strong {
    display: block;
    margin-bottom: 0.28rem;
    color: #17311d;
    font-size: 0.9rem;
}

.pc-story-reader__comment p {
    margin: 0;
    color: rgba(19, 40, 24, 0.82);
    line-height: 1.6;
}

.pc-story-reader__empty-comments {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(48, 75, 53, 0.06);
    color: rgba(19, 40, 24, 0.72);
    font-weight: 700;
}

.pc-story-reader__comment-form {
    display: grid;
    gap: 0.7rem;
}

.pc-story-reader__comment-form textarea {
    width: 100%;
    min-height: 110px;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(48, 75, 53, 0.18);
    border-radius: 18px;
    resize: vertical;
    background: #fff;
    color: #17311d;
    font: inherit;
    line-height: 1.55;
}

.pc-story-reader__comment-form textarea:focus {
    outline: none;
    border-color: rgba(48, 75, 53, 0.46);
    box-shadow: 0 0 0 4px rgba(48, 75, 53, 0.10);
}

.pc-story-reader__comment-form button,
.pc-story-reader__login-comment {
    justify-self: start;
    border: 0;
    border-radius: 999px;
    padding: 0.72rem 1rem;
    background: #17311d;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.pc-story-reader__comment-form button:hover,
.pc-story-reader__login-comment:hover {
    transform: translateY(-1px);
    background: #e8651a;
    box-shadow: 0 9px 20px rgba(232, 101, 26, 0.2);
}

.pc-story-reader__comment-form button:disabled {
    cursor: wait;
    opacity: 0.68;
}

.pc-story-reader__form-note {
    min-height: 1.3rem;
    color: rgba(19, 40, 24, 0.72);
    font-size: 0.9rem;
    font-weight: 700;
}

.pc-story-reader__engagement {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem max(1rem, calc((100% - 760px) / 2));
    background: rgba(251, 248, 239, 0.96);
    border-top: 1px solid rgba(48, 75, 53, 0.13);
    box-shadow: 0 -18px 48px rgba(23, 49, 29, 0.08);
}

.pc-story-reader__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 0.95rem;
    border: 1px solid rgba(48, 75, 53, 0.16);
    border-radius: 999px;
    background: #fff;
    color: #17311d;
    cursor: pointer;
    font-weight: 900;
    font-size: 0.92rem;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.pc-story-reader__action:hover {
    transform: translateY(-2px);
    border-color: rgba(48, 75, 53, 0.35);
    box-shadow: 0 10px 22px rgba(23, 49, 29, 0.11);
}

.pc-story-reader__action.is-active {
    background: #17311d;
    color: #fff;
}

.pc-story-reader__action:disabled {
    cursor: wait;
    transform: none;
    opacity: 0.72;
}

.pc-story-reader__action-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
}

.pc-story-reader__action-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pc-story-reader__action.is-active .pc-story-reader__action-icon svg {
    fill: #e8651a;
    stroke: #e8651a;
}

.pc-story-reader__action small {
    font-size: 0.82rem;
    font-weight: 850;
    opacity: 0.9;
}

.pc-story-reader__status {
    position: absolute;
    z-index: 8;
    right: 1.25rem;
    bottom: 78px;
    max-width: min(420px, calc(100% - 2rem));
    padding: 0.78rem 1rem;
    border: 1px solid rgba(48, 75, 53, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    color: #17311d;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.45;
    box-shadow: 0 16px 40px rgba(12, 30, 17, 0.2);
}

.pc-story-reader__status[hidden] {
    display: none;
}

.pc-story-reader__status[data-tone="success"] {
    border-color: rgba(44, 111, 64, 0.28);
    background: #eef8ef;
    color: #225d32;
}

.pc-story-reader__status[data-tone="error"] {
    border-color: rgba(177, 61, 41, 0.26);
    background: #fff2ee;
    color: #96331f;
}

@media (max-width: 720px) {
    .pc-story-reader {
        padding: 0;
    }

    .pc-story-reader__shell {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .pc-story-reader__hero,
    .pc-story-reader__hero-copy {
        min-height: 310px;
    }

    .pc-story-reader__scroll {
        padding: 1.15rem 1rem 1.5rem;
    }

    .pc-story-reader__engagement {
        gap: 0.45rem;
        padding: 0.68rem max(0.65rem, env(safe-area-inset-right)) max(0.68rem, env(safe-area-inset-bottom)) max(0.65rem, env(safe-area-inset-left));
    }

    .pc-story-reader__action {
        min-width: 0;
        min-height: 46px;
        padding: 0.55rem 0.5rem;
        font-size: 0.82rem;
    }

    .pc-story-reader__status {
        right: 0.75rem;
        bottom: calc(70px + env(safe-area-inset-bottom));
        max-width: calc(100% - 1.5rem);
    }

    .pc-story-reader__title {
        font-size: clamp(2rem, 11vw, 3.25rem);
    }

    .pc-story-reader__comments-head {
        align-items: flex-end;
    }
}

@media (max-width: 360px) {
    .pc-story-reader__engagement {
        gap: 0.35rem;
        padding: 0.65rem 0.45rem;
    }

    .pc-story-reader__action {
        gap: 0.25rem;
        padding: 0.55rem 0.35rem;
        font-size: 0.78rem;
    }

    .pc-story-reader__action small {
        font-size: 0.72rem;
    }
}

.pc-story-reader__comment.is-pending {
    opacity: 0.88;
    border: 1px dashed rgba(125, 89, 45, 0.35);
    background: rgba(255, 248, 230, 0.72);
}

.pc-story-reader__pending-badge {
    display: inline-flex;
    margin-left: 0.45rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(125, 89, 45, 0.12);
    color: #7d592d;
    font-size: 0.72rem;
    font-weight: 800;
}
