/*
 * MindMonks — Premium Booklet: card + article + share button.
 * Scoped to .mm-post-card--premium and .mm-article-premium-* only.
 * Zero unscoped selectors.
 */

/* ── CARD (Booklet index) ─────────────────────────────────────────── */

.mm-post-card--premium {
    position: relative;
    border: 1.5px solid var(--mm-teal-200);
    box-shadow:
        0 2px 8px rgba(1, 54, 40, 0.07),
        0 6px 24px rgba(1, 54, 40, 0.06);
    transition: box-shadow 220ms ease, transform 220ms ease;
}

.mm-post-card--premium:hover,
.mm-post-card--premium:focus-within {
    box-shadow:
        0 4px 16px rgba(1, 54, 40, 0.11),
        0 12px 36px rgba(1, 54, 40, 0.09);
    transform: translateY(-3px);
}

/* Image wrapper */
.mm-post-card--premium .mm-post-card__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--mm-teal-050);
}

.mm-post-card--premium .mm-post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 360ms ease;
    display: block;
}

.mm-post-card--premium:hover .mm-post-card__media img {
    transform: scale(1.04);
}

/* Premium badge — sits over the image top-left */
.mm-premium-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    background: var(--mm-teal-800);
    color: #fff;
    font-family: var(--mm-font-body);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 999px;
    pointer-events: none;
    user-select: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.mm-premium-badge svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Card body */
.mm-post-card--premium .mm-post-card__body {
    padding: 1.1rem 1.1rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.mm-post-card--premium .mm-post-card__title {
    font-size: var(--mm-text-lg);
    margin: 0;
}

.mm-post-card--premium .mm-card__text {
    color: var(--mm-neutral-700);
    font-size: var(--mm-text-sm);
    line-height: 1.6;
    margin: 0;
}

/* Footer row: Read link + PDF + Share */
.mm-post-card--premium .mm-post-card__foot {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── SHARE BUTTON — card (icon over image, top-right) ────────────────── */

/* Icon-only button floating top-right of the card image */
.mm-card-share-btn {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: none;
    border-radius: 50%;
    color: var(--mm-teal-800);
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.mm-card-share-btn:hover,
.mm-card-share-btn:focus-visible {
    background: #fff;
    transform: scale(1.08);
    outline: none;
    box-shadow: 0 0 0 3px rgba(1,54,40,0.18);
}

.mm-card-share-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

/* Article share button — pill style */
.mm-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.85rem;
    background: transparent;
    border: 1.5px solid var(--mm-teal-200);
    border-radius: 999px;
    color: var(--mm-teal-800);
    font-family: var(--mm-font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    background: none;
}

.mm-share-btn:hover,
.mm-share-btn:focus-visible {
    background: var(--mm-teal-050);
    border-color: var(--mm-teal-300);
    outline: none;
    box-shadow: 0 0 0 3px rgba(1,54,40,0.14);
}

.mm-share-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mm-share-wrap {
    position: relative;
    display: inline-flex;
}

/* ── ARTICLE PAGE ────────────────────────────────────────────────── */

/* Actions bar: date + read time on left, PDF + share on right */
.mm-article__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mm-article__actions-right {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

/* Keep PDF button and share on one line */
.mm-article__actions .mm-pdf {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Premium resource badge — inline in the article, above first paragraph */
.mm-article-premium-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    margin-bottom: 1.1rem;
    background: var(--mm-teal-800);
    color: #fff;
    font-family: var(--mm-font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 999px;
}

.mm-article-premium-label svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Lead image — override the theme's default figure margin so it's flush */
.mm-article__lead-image {
    border-radius: var(--mm-radius-lg);
    overflow: hidden;
    box-shadow: 0 3px 18px rgba(1, 54, 40, 0.10);
    margin-bottom: 2rem;
}

.mm-article__lead-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
    object-position: center top;
}

/* Share row at end of article */
.mm-article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1.25rem 0;
    border-top: 1px solid var(--mm-neutral-200);
    margin-top: 0.5rem;
}

.mm-article-share__label {
    font-size: var(--mm-text-sm);
    font-weight: 600;
    color: var(--mm-neutral-700);
}

/* ── SHARE MODAL (WhatsApp / Copy link) ─────────────────────────── */

.mm-share-sheet {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

.mm-share-sheet.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mm-share-sheet__panel {
    width: 100%;
    max-width: 420px;
    background: var(--mm-neutral-000);
    border-radius: var(--mm-radius-lg) var(--mm-radius-lg) var(--mm-radius-sm) var(--mm-radius-sm);
    padding: 1.5rem;
    transform: translateY(24px);
    transition: transform 220ms ease;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.12);
}

.mm-share-sheet.is-open .mm-share-sheet__panel {
    transform: translateY(0);
}

.mm-share-sheet__title {
    font-family: var(--mm-font-body);
    font-size: var(--mm-text-base);
    font-weight: 700;
    color: var(--mm-neutral-900);
    margin: 0 0 1rem;
}

.mm-share-sheet__options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mm-share-sheet__option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--mm-neutral-200);
    border-radius: var(--mm-radius-md);
    background: transparent;
    color: var(--mm-neutral-900);
    font-family: var(--mm-font-body);
    font-size: var(--mm-text-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease;
    width: 100%;
    text-align: left;
}

.mm-share-sheet__option:hover,
.mm-share-sheet__option:focus-visible {
    background: var(--mm-teal-050);
    border-color: var(--mm-teal-200);
    outline: none;
}

.mm-share-sheet__option svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mm-share-sheet__option--wa svg { fill: #25D366; }
.mm-share-sheet__option--copy svg { fill: none; stroke: var(--mm-teal-800); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.mm-share-sheet__close {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.6rem;
    background: transparent;
    border: none;
    border-radius: var(--mm-radius-md);
    color: var(--mm-neutral-500);
    font-family: var(--mm-font-body);
    font-size: var(--mm-text-sm);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: color 150ms ease;
}

.mm-share-sheet__close:hover { color: var(--mm-neutral-900); }

.mm-share-sheet__copy-confirm {
    display: none;
    font-size: 0.75rem;
    color: var(--mm-teal-700);
    font-weight: 600;
    margin-top: 0.25rem;
    text-align: center;
}

.mm-share-sheet__copy-confirm.is-visible { display: block; }
