/* ============================================
   SHARE — "Send to a friend who should read this"
   v1.0
   ============================================ */

/* ---------- After-reading block (story footer) ----------
   Combined two-link block that replaces the old standalone
   guestbook-pointer. Two equal-weight typographic invitations. */

.v-story-afterread {
    max-width: var(--v-reading-max-width);
    margin: 0 auto;
    padding: 3rem var(--v-space-lg) 3.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.v-story-afterread__link {
    font-family: var(--v-font-body);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--v-text-muted);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
    cursor: pointer;
}

.v-story-afterread__link:hover,
.v-story-afterread__link:focus-visible {
    color: var(--v-accent);
    outline: none;
}


/* ---------- Modal overlay ---------- */

.v-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(8, 12, 22, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.v-share-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ---------- Modal body ---------- */

.v-share-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--v-bg-elevated, #121826);
    border: 1px solid var(--v-border, rgba(255,255,255,0.08));
    border-radius: 4px;
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
    padding: 2.4rem 2.2rem 2rem;
    transform: translateY(12px);
    transition: transform 0.3s ease;
}

.v-share-overlay.is-open .v-share-modal {
    transform: translateY(0);
}

.v-share-modal__close {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: none;
    border: none;
    color: var(--v-text-muted);
    font-size: 1.6rem;
    line-height: 1;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    transition: color 0.2s;
}

.v-share-modal__close:hover,
.v-share-modal__close:focus-visible {
    color: var(--v-text);
    outline: none;
}

/* ---------- Compose state ---------- */

.v-share-modal__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 1.7rem;
    color: var(--v-text);
    margin: 0 0 0.4rem;
    text-align: center;
    letter-spacing: 0.005em;
}

.v-share-modal__story {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--v-text-secondary);
    text-align: center;
    margin: 0 0 1.8rem;
    line-height: 1.4;
}

.v-share-modal__story::before { content: "\201C"; opacity: 0.55; margin-right: 0.1em; }
.v-share-modal__story::after  { content: "\201D"; opacity: 0.55; margin-left: 0.1em; }

.v-share-modal__story:empty {
    display: none;
}

.v-share-modal__label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--v-text-muted);
    margin-bottom: 0.5rem;
}

.v-share-modal__note {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--v-border, rgba(255,255,255,0.1));
    border-radius: 3px;
    padding: 0.9rem 1rem;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--v-text);
    resize: vertical;
    min-height: 5rem;
    transition: border-color 0.2s ease;
}

.v-share-modal__note::placeholder {
    color: var(--v-text-muted);
    font-style: italic;
    opacity: 0.8;
}

.v-share-modal__note:focus {
    outline: none;
    border-color: var(--v-accent);
}

/* ---------- Actions ---------- */

.v-share-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.4rem;
}

.v-share-modal__btn {
    background: transparent;
    border: 1px solid var(--v-border-strong, rgba(255,255,255,0.18));
    color: var(--v-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.85rem 1.2rem;
    border-radius: 2px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    text-align: center;
    width: 100%;
}

.v-share-modal__btn:hover,
.v-share-modal__btn:focus-visible {
    border-color: var(--v-accent);
    color: var(--v-accent);
    outline: none;
}

.v-share-modal__btn.is-copied {
    border-color: var(--v-accent);
    color: var(--v-accent);
}

.v-share-modal__btn--quiet {
    border: none;
    color: var(--v-text-muted);
    font-size: 0.65rem;
    margin-top: 1rem;
}

.v-share-modal__btn--quiet:hover {
    color: var(--v-accent);
    border-color: transparent;
}

.v-share-modal__hint {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--v-text-muted);
    text-align: center;
    margin: 1.1rem 0 0;
    line-height: 1.45;
}

/* ---------- Thank-you state ---------- */

.v-share-modal__thanks {
    text-align: center;
    padding: 1.2rem 0 0.4rem;
}

.v-share-modal__thanks-ornament {
    color: var(--v-accent);
    opacity: 0.6;
    letter-spacing: 0.6em;
    padding-left: 0.6em; /* compensate for letter-spacing pushing right */
    font-size: 0.9rem;
    margin-bottom: 1.4rem;
}

.v-share-modal__thanks-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.45;
    color: var(--v-text);
    margin: 0 0 1.4rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
    .v-share-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .v-share-modal {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        padding: 2rem 1.4rem 1.6rem;
        transform: translateY(100%);
    }

    .v-share-overlay.is-open .v-share-modal {
        transform: translateY(0);
    }

    .v-share-modal__title {
        font-size: 1.5rem;
    }

    .v-share-modal__thanks-text {
        font-size: 1.15rem;
    }
}

/* ---------- Light/sepia overrides ---------- */

html[data-theme="light"] .v-share-overlay,
html[data-theme="sepia"] .v-share-overlay {
    background: rgba(50, 38, 28, 0.55);
}

html[data-theme="light"] .v-share-modal__note,
html[data-theme="sepia"] .v-share-modal__note {
    background: rgba(0, 0, 0, 0.04);
    color: var(--v-text);
}
