/* =============================================================
   Oracle Card Reading – Frontend Styles
   callingspades.com
   -------------------------------------------------------------
   Single source of truth. All colors, fonts, radii, and shadows
   live as custom properties at the top so future tweaks are
   one-line edits instead of hunting through the file.

   NOTE (2026-08-31 cleanup): pure BuddyPress-core styling (activity
   stream, buttons, forms, nav tabs, feedback messages, tables,
   message threads) has moved to the child theme's style.css, since
   that's general site/community styling, not plugin-specific. What
   stays here is the reading-app UI plus the Oracle plugin's own
   BuddyPress shortcode widgets (member facepile, card of the day,
   invite-a-friend, member nav/stats) — markup this plugin generates,
   so its CSS travels with the plugin.
   ============================================================= */

:root {
    /* ---------- Brand pinks ---------- */
    --pink:           #F70F9F;   /* canonical hot pink */
    --pink-hover:     #FD8ECF;   /* lighter hover */
    --pink-deep:      #C00B7F;   /* darker pink for active/pressed */
    --pink-soft:      #fcecf6;   /* very light pink wash */
    --pink-mid:       #F9DEEF;   /* medium light pink */

    /* ---------- Complementary accents ---------- */
    /* Replacing the leftover greens, blues, and clinical reds
       with shades that harmonize with the pink palette. */
    --plum:           #6B2D5C;   /* deep mulberry — for serious accents */
    --plum-soft:      rgba(107, 45, 92, 0.08);
    --gold:           #D4A017;   /* warm amber for "advice" / highlights */
    --gold-soft:      rgba(212, 160, 23, 0.10);
    --teal:           #2D7D7D;   /* dusty teal for extended interpretation */
    --teal-soft:      rgba(45, 125, 125, 0.08);

    /* ---------- Error / warning (warm, not clinical) ---------- */
    --warning:        #B8336A;   /* berry, replacing #d32f2f red */
    --warning-bg:     #fdf2f8;   /* soft pink-cream wash */
    --warning-border: #f5c6db;

    /* ---------- Neutrals ---------- */
    --ink:            #2a2a2a;
    --ink-soft:       #555;
    --muted:          #666;
    --line:           #eee;
    --line-strong:    #ddd;
    --bg-soft:        #f9f9f9;
    --white:          #ffffff;

    /* ---------- Type ---------- */
    --font-display:   "Elsie Swash Caps", Georgia, serif;
    --font-body:      "Cause", "Nunito", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* ---------- Shape & motion ---------- */
    --radius-sm:      4px;
    --radius-md:      8px;
    --radius-lg:      12px;
    --radius-pill:    9999px;

    --shadow-xs:      0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-sm:      0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md:      0 4px 12px rgba(247, 15, 159, 0.12);
    --shadow-lg:      0 6px 20px rgba(247, 15, 159, 0.18);

    --ease:           0.25s ease;

    /* ---------- Shared hover treatment ---------- */
    /* The "lift + dotted black border + pink-to-light-pink" hover used
       across every Oracle-branded button/link. Was duplicated five
       separate times in this file; now declared once and applied via
       a combined selector below. */
    --hover-bg:       #FD8ECF;
    --hover-border:   #0C0C0C;
}

/* =============================================================
   Container & base
   ============================================================= */

.oracle-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--font-body);
    color: var(--ink);
}

/* =============================================================
   Reading Form
   ============================================================= */

.reading-form {
    text-align: center;
    margin-bottom: 40px;
    padding: 24px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.reading-form h2 {
    font-family: var(--font-display);
    color: var(--pink);
    font-weight: 600;
    margin-bottom: 4px;
}

.reading-form input[type="text"] {
    width: 80%;
    max-width: 500px;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font-body);
}

.reading-form input {
    width: 50%;
    max-width: 500px;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font-body);
}

.reading-form button {
    background-color: var(--pink);
    color: var(--white);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color var(--ease);
    font-family: var(--font-body);
    font-weight: 600;
}

.reading-form button:hover {
    background-color: var(--pink-hover);
}

.reading-form button:active {
    background-color: var(--pink-deep);
}

.reading-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 16px;
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-body);
}

.reading-form textarea:focus,
.reading-form input:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(247, 15, 159, 0.15);
}

.reading-type-select {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 16px;
    background-color: var(--white);
    font-family: var(--font-body);
}

.reading-type-select:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(247, 15, 159, 0.15);
}

/* Spread info ("?") button + popup */
.oracle-spread-select-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.oracle-spread-select-row .reading-type-select {
    flex: 1;
}

.oracle-spread-info-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #F70F9F;
    background: #fff;
    color: #F70F9F;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.oracle-spread-info-btn:hover:not(:disabled) {
    background: #F70F9F;
    color: #fff;
}

.oracle-spread-info-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.oracle-spread-info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}

.oracle-spread-info-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 28px 24px 24px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.oracle-spread-info-modal h3 {
    font-family: 'Elsie Swash Caps', serif;
    color: #F70F9F;
    margin: 0 0 16px;
    padding-right: 24px;
}

.oracle-spread-info-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 4px;
}

.oracle-spread-info-close:hover {
    color: #F70F9F;
}

.oracle-spread-info-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.oracle-spread-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.oracle-spread-info-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fcecf6;
    color: #F70F9F;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom hover tooltip for the spread info button (replaces native title) */
.oracle-spread-info-btn {
    position: relative;
}

.oracle-spread-info-btn[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    max-width: 200px;
    width: max-content;
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    padding: 6px 10px;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 10;
}

.oracle-spread-info-btn[data-tooltip]::after {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 8px;
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: -2px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 10;
}

.oracle-spread-info-btn[data-tooltip]:not(:disabled):hover::before,
.oracle-spread-info-btn[data-tooltip]:not(:disabled):hover::after {
    opacity: 1;
    visibility: visible;
}

/* =============================================================
   Cards container & individual card
   ============================================================= */

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.card {
    width: calc(25% - 20px);
    min-width: 200px;
    max-width: 250px;
    height: auto;
    cursor: pointer;
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--ease), box-shadow var(--ease);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-content {
    text-align: center;
}

/* Hide deprecated card-flip and unused buttons */
.card-inner,
.card-front,
.card-back,
.flip-prompt,
button.narrative-button,
button.patterns-button,
button.relationship-button,
.card-position-meaning {
    display: none;
}

.card-image {
    font-size: 48px;
    margin: 20px 0;
}

.card-title {
    font-family: var(--font-display);
    color: var(--pink);
    font-size: 26px;
    font-weight: 600;
    padding: 10px;
    line-height: 1.1;
    overflow-wrap: break-word;
}

span.meanings-titles {
    font-style: italic;
    font-weight: 600;
    color: var(--pink);
}

.summary-card p strong {
    color: var(--ink-soft);
    display: inline-block;
    min-width: 150px;
}

/* Position pill */
.card-position {
    background-color: var(--pink-mid);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--pink);
}

/* =============================================================
   Reading Summary
   ============================================================= */

.reading-summary {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.reading-summary h3 {
    text-align: center;
    color: var(--pink);
    margin-bottom: 20px;
    font-size: 24px;
    font-family: var(--font-display);
    font-weight: 600;
}

.detailed-summary h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--pink);
}

.reading-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.detailed-summary {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.summary-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
}

.summary-card h4 {
    color: var(--ink);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.summary-card p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.summary-card strong {
    color: var(--ink-soft);
}

.login-prompt {
    text-align: center;
    margin-top: 20px;
    color: var(--muted);
    font-style: italic;
}

/* =============================================================
   Saved Readings
   ============================================================= */

.saved-reading {
    background: var(--white);
    padding: 20px;
    margin: 20px 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--ease);
}

.saved-reading:hover {
    transform: translateY(-2px);
}

.saved-reading h3 {
    color: var(--ink);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.saved-reading .reading-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.saved-reading .reading-card {
    background: var(--bg-soft);
    padding: 15px;
    border-radius: var(--radius-md);
}

.saved-reading .reading-card h4 {
    color: var(--ink);
    margin-bottom: 12px;
}

.saved-reading .reading-card p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.saved-reading .reading-card strong {
    color: var(--ink-soft);
}

.saved-reading-date {
    color: var(--muted);
    font-style: italic;
    margin-bottom: 15px;
}

/* =============================================================
   Reading Header & Card Layout
   ============================================================= */

.oracle_reading h1.entry-title {
    margin-left: 0;
    font-family: var(--font-display);
    font-size: 2.4em;
    font-weight: 600;
    color: var(--pink);
}

.reading-header-section {
    background: var(--pink-soft);
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid var(--pink);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.reading-header-section p {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: var(--pink);
}

.reading-header-section h3 {
    margin: 10px 0 0 0;
    color: var(--ink);
    font-size: 16px;
}

.reading-card {
    display: flex;
    background: var(--white);
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.reading-card-position h4 {
    color: var(--pink);
    font-weight: 600;
    font-family: var(--font-display);
}

.reading-card-middle {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-soft);
    align-items: flex-start;
}

.card-image-column {
    flex: 0 0 35%;
    margin-right: 20px;
}

.card-image-column img {
    width: 100%;
    height: auto;
}

.card-meanings-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card-meanings-column p {
    margin: 0;
    line-height: 1.6;
    padding: 12px;
    border-radius: var(--radius-md);
}

.oracle-card-section {
    margin-bottom: 1.5rem;
    overflow: auto;
}
.oracle-card-thumb {
    float: left;
    width: 90px;
    margin: 0 16px 8px 0;
}
.oracle-card-thumb img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}
.oracle-card-text p:first-child {
    margin-top: 0;
}

.ai-summary {
    margin-top: 4.5rem;
}

/* Future opt-in: add "oracle-thumb-sticky" as a class on any ancestor
   (e.g. body, or .ai-interpretation via a snippet) to switch to the
   column layout instead — no markup changes needed. */
.oracle-thumb-sticky .oracle-card-section {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.oracle-thumb-sticky .oracle-card-thumb {
    float: none;
    flex: 0 0 90px;
    width: 90px;
    margin: 0;
    position: sticky;
    top: 20px;
}
.oracle-thumb-sticky .oracle-card-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* ----- Order-based color coding (replaces broken :contains) -----
   In the PHP markup, the meanings column emits:
     <p>1: Meaning</p>
     <p>2: Extended Interpretation (optional)</p>
   And the footer emits:
     <p>1: What this card means in this position (optional)</p>
     <p>2: Advice</p>
   Using nth-of-type matches that ordering reliably.
*/

.card-meanings-column p:nth-of-type(1) {
    background: var(--pink-soft);
    border-left: 3px solid var(--pink);
}

.card-meanings-column p:nth-of-type(2) {
    background: var(--teal-soft);
    border-left: 3px solid var(--teal);
}

.card-meanings-column p strong {
    color: var(--pink);
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 20px;
    font-family: var(--font-display);
}

.reading-card-footer {
    padding: 20px;
    background: var(--white);
    border-bottom: 1px solid var(--pink);
    margin-bottom: 50px;
}

.reading-card-footer h4 {
    color: var(--ink);
    margin: 0 0 15px 0;
    padding: 10px;
    background: var(--pink-soft);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--pink);
    font-size: 18px;
}

.reading-card-footer p {
    margin: 0 0 12px 0;
    line-height: 1.6;
    padding: 10px;
    border-radius: var(--radius-md);
}

.reading-card-footer p:nth-of-type(1) {
    background: var(--gold-soft);
    border-left: 3px solid var(--gold);
}

.reading-card-footer p:nth-of-type(2) {
    background: var(--plum-soft);
    border-left: 3px solid var(--plum);
}

/* If only "Advice" is present (no position meaning), it lands as
   nth-of-type(1). Override with :only-of-type so a lone advice
   block still gets the plum styling. */
.reading-card-footer p:only-of-type {
    background: var(--plum-soft);
    border-left: 3px solid var(--plum);
}

.reading-card-footer p strong {
    color: var(--pink);
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 20px;
    font-family: var(--font-display);
}

/* =============================================================
   Responsive — reading card layout
   ============================================================= */

@media (max-width: 768px) {
    .reading-card-middle {
        flex-direction: column;
        padding: 15px;
    }

    .card-image-column {
        flex: 0 0 100%;
        align-self: center;
        width: 100%;
    }

    .card-meanings-column {
        width: 100%;
        padding: 15px;
    }

    .reading-header-section {
        padding: 15px;
    }

    .reading-card {
        display: block;
    }

    .reading-card-footer {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .reading-card-middle {
        gap: 15px;
    }

    .card-meanings-column p,
    .reading-card-footer p {
        padding: 8px;
    }
}

/* =============================================================
   Animations
   ============================================================= */

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================================
   Loading & error states
   ============================================================= */

.loading {
    text-align: center;
    padding: 40px;
}

.loading:after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--pink-soft);
    border-top: 4px solid var(--pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-message {
    margin-top: 18px;
    color: var(--pink);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    animation: fadePhrase 0.4s ease-in-out;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.error-message {
    color: var(--warning);
    text-align: center;
    padding: 20px;
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: var(--radius-md);
    margin: 20px 0;
}

/* =============================================================
   Position color-coding (data attributes)
   ============================================================= */

.card[data-position="Past/Root"] .card-position {
    background-color: rgba(212, 160, 23, 0.15);
    border-left: 3px solid var(--gold);
}

.card[data-position="Present/Situation"] .card-position {
    background-color: rgba(45, 125, 125, 0.15);
    border-left: 3px solid var(--teal);
}

.card[data-position="Future/Potential"] .card-position {
    background-color: rgba(247, 15, 159, 0.15);
    border-left: 3px solid var(--pink);
}

/* =============================================================
   Reading Timeline
   ============================================================= */

.reading-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 30px;
    position: relative;
    padding: 0 30px;
}

.timeline-bar {
    position: absolute;
    height: 3px;
    background: linear-gradient(to right, var(--gold), var(--teal), var(--pink));
    width: calc(100% - 60px);
    z-index: 1;
}

.timeline-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timeline-marker::after {
    content: attr(data-label);
    position: absolute;
    top: -25px;
    white-space: nowrap;
    font-size: 14px;
}

.timeline-marker.past    { background-color: var(--gold); }
.timeline-marker.present { background-color: var(--teal); }
.timeline-marker.future  { background-color: var(--pink); }

.position-icon {
    margin-right: 5px;
    font-size: 16px;
    display: none;
}

/* =============================================================
   Action buttons (save / etc.)
   ============================================================= */

.reading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    justify-content: center;
}

.reading-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-family: var(--font-body);
    font-weight: 600;
    transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease);
}

.reading-actions button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.save-button {
    display: block;
    margin: 30px auto 0;
    padding: 12px 24px;
    background-color: var(--pink);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    font-family: var(--font-body);
    font-weight: 600;
    transition: background-color var(--ease);
}

.save-button:hover {
    background-color: var(--pink-hover);
}

.save-button:active {
    background-color: var(--pink-deep);
}

/* For relationships SVG overlay */
.relationship-overlay {
    pointer-events: none;
    z-index: 5;
}

/* =============================================================
   Position influence sliders
   ============================================================= */

.position-influence {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--bg-soft);
    border-radius: var(--radius-md);
}

.influence-slider {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.influence-slider label {
    width: 120px;
    font-weight: bold;
}

.slider-track {
    flex-grow: 1;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: var(--radius-sm);
    margin: 0 15px;
    position: relative;
}

.slider-fill {
    position: absolute;
    height: 100%;
    background-color: var(--pink);
    border-radius: var(--radius-sm);
}

.influence-slider span {
    width: 40px;
    text-align: right;
}

@media (max-width: 768px) {
    .reading-actions {
        flex-direction: column;
    }

    .reading-actions button {
        width: 100%;
    }

    .timeline-marker::after {
        font-size: 12px;
    }
}

/* =============================================================
   Readings remaining / limits / upgrade prompts
   ============================================================= */

.readings-remaining {
    background: var(--pink-mid);
    padding: 12px;
    border-radius: var(--radius-md);
    margin: 15px 0 50px;
    border-left: 4px solid var(--pink);
}

.readings-remaining p {
    margin: 5px 0;
}

.upgrade-prompt {
    font-style: italic;
    color: var(--muted);
}

.ask-followup {
    background: var(--bg-soft);
    border-left: 4px solid var(--pink);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 30px 0;
}

.ask-followup h4 {
    margin-top: 0;
}

.ask-followup textarea {
    width: 100%;
    font-family: var(--font-body);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--pink-mid);
    resize: vertical;
    margin-bottom: 12px;
}

.ask-followup .get-reading-btn {
    display: block;
    margin: 0 auto;
    padding: 12px 24px;
    background-color: var(--pink);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    font-family: var(--font-body);
    font-weight: 600;
    transition: background-color var(--ease);
}

.ask-followup .get-reading-btn:hover {
    background-color: var(--pink-hover);
}

.ask-followup .get-reading-btn:disabled {
    background-color: var(--muted);
    cursor: not-allowed;
}

.followup-limit-reached {
    font-style: italic;
    color: var(--muted);
    text-align: center;
    margin: 20px 0;
}

.ai-followup-round {
    border-top: 2px dashed var(--pink-mid);
    margin-top: 30px;
    padding-top: 20px;
}

.ai-followup-round h4 {
    color: var(--pink);
}

.reading-followup-block {
    margin: 24px auto;
    padding: 12px 16px;
    border-left: 3px solid #F70F9F;
    background: #fcecf6;
}
.followup-question-label {
    font-family: 'Elsie Swash Caps', serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    color: #F70F9F;
    margin: 0 0 4px 0;
}
.followup-question-text {
    font-weight: 600;
    margin: 0;
}

.reading-notes {
    background: var(--bg-soft);
    border-left: 4px solid var(--pink);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 30px 0;
}

.reading-notes h4 {
    margin-top: 0;
}

.reading-notes textarea {
    width: 100%;
    font-family: var(--font-body);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--pink-mid);
    resize: vertical;
    margin-bottom: 12px;
    min-height: 90px;
}

.reading-notes .save-notes-btn {
    display: block;
    margin: 0 auto;
    padding: 12px 24px;
    background-color: var(--pink);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    font-family: var(--font-body);
    font-weight: 600;
    transition: background-color var(--ease);
}

.reading-notes .save-notes-btn:hover:not(:disabled) {
    background-color: var(--pink-hover);
}

.reading-notes .save-notes-btn:disabled {
    background-color: var(--muted);
    cursor: not-allowed;
}

.reading-notes-status {
    font-style: italic;
    color: var(--muted);
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
}

.reading-notes.notes-locked textarea,
.reading-notes.notes-locked .save-notes-btn,
.reading-notes.notes-pending textarea,
.reading-notes.notes-pending .save-notes-btn {
    opacity: 0.5;
    pointer-events: none;
}

.reading-notes .notes-lock-message {
    font-size: 0.9em;
    text-align: center;
    margin-top: 10px;
    color: var(--muted);
}

.reading-notes .notes-lock-message a {
    color: var(--pink);
    font-weight: 600;
}

.limit-reached-message {
    background: var(--gold-soft);
    border: 1px solid var(--gold);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    margin: 30px auto;
    max-width: 600px;
}

.upgrade-button {
    display: inline-block;
    background: var(--pink);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    margin-top: 15px;
    font-weight: bold;
    transition: background-color var(--ease);
}

.upgrade-button:hover {
    background: var(--pink-hover);
}

.upgrade-button:active {
    background: var(--pink-deep);
}

/* Shortcode display */
.readings-status {
    padding: 15px;
    border-radius: var(--radius-md);
    margin: 15px 0;
}

.readings-status.unlimited {
    background: var(--pink-mid);
    border: 4px dotted var(--pink);
}

.readings-status.limited {
    background: var(--pink-soft);
    border: 4px dotted var(--pink);
}

/* =============================================================
   Pagination
   ============================================================= */

.reading-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.reading-pagination button {
    padding: 8px 16px;
    background-color: var(--pink);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    transition: background-color var(--ease);
}

.reading-pagination button:hover:not(:disabled) {
    background-color: var(--pink-hover);
}

.reading-pagination button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: var(--muted);
}

/* =============================================================
   BuddyPress widgets — Oracle plugin shortcodes only
   -------------------------------------------------------------
   This is markup THIS PLUGIN generates (class-buddypress-shortcodes.php)
   and only ever appears on BuddyPress pages: [bp_member_nav],
   [oracle_member_facepile], [oracle_card_of_the_day], [bp_member_stats]'s
   list layout. Pure BuddyPress-core element styling (activity stream,
   buttons, forms, nav tabs, tables, messages) now lives in the child
   theme's style.css instead — see that file's "BuddyPress — core
   elements" section.
   ============================================================= */

.bp-custom-member-nav ul.member-nav-list {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bp-custom-member-nav ul.member-nav-list li {
    display: inline-block;
    margin: 0 10px 0 0;
}

.bp-custom-member-nav ul.member-nav-list li a {
    display: block;
    padding: 5px 10px;
    text-decoration: none;
}

.bp-custom-member-nav ul.member-nav-list li.current a {
    font-weight: bold;
}

.oracle-member-facepile {
    margin: 10px 0;
}
.oracle-facepile-heading {
    font-weight: bold;
    margin-bottom: 10px;
    font-family: "Elsie Swash Caps", serif;
    color: #F70F9F;
}
.oracle-facepile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.oracle-facepile-row {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.oracle-facepile-row:hover .oracle-facepile-name {
    text-decoration: underline;
}
.oracle-facepile-avatar {
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    background: #eee;
    display: block;
}
.oracle-facepile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.oracle-facepile-name {
    font-size: 14px;
}

h3.cotd-heading {
    margin-top: 0px !important;
    color: #F70F9F;
}

h4.cotd-card-name {
    margin: 0.5em 0 !important;
}

p.cotd-meaning {
    font-size: 15px;
}

/* [bp_member_stats] list layout ("stats-list" attr value) */
.stats-list .stat-item {
    background-color: #fdf0f8 !important;
}

/* =============================================================
   Invite a Friend widget — activity page
   ============================================================= */

.oracle-invite-friend {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--pink-soft) 0%, var(--white) 65%);
    border: 1px solid var(--pink-mid);
    border-radius: var(--radius-lg);
    padding: 28px 26px 24px;
    overflow: hidden;
    text-align: center;
}

/* Torn-envelope-flap effect across the top edge */
.oracle-invite-friend::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background:
        linear-gradient(135deg, var(--pink-mid) 50%, transparent 50%),
        linear-gradient(-135deg, var(--pink-mid) 50%, transparent 50%);
    background-size: 50% 100%;
    background-position: left top, right top;
    background-repeat: no-repeat;
    opacity: 0.6;
    pointer-events: none;
}

.oracle-invite-friend .invite-seal {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pink);
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.oracle-invite-friend .invite-seal::after {
    content: "\2709"; /* envelope glyph */
    color: var(--white);
    font-size: 32px;
    line-height: 1;
    margin-top: -4px;
}

.oracle-invite-friend .invite-heading {
    position: relative;
    font-family: var(--font-display);
    color: var(--plum);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.3px;
    margin: 0 0 10px;
}

.oracle-invite-friend .invite-body {
    position: relative;
}

.oracle-invite-friend .invite-body p {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 18px;
    font-family: var(--font-body);
}

.oracle-invite-friend .invite-limit-note {
    color: var(--gold);
    font-size: 12px;
    margin-top: -8px;
}

.oracle-invite-friend .invite-cta {
    display: inline-block;
    background: var(--pink);
    font-family: var(--e-global-typography-accent-font-family), Sans-serif;
    font-size: var(--e-global-typography-accent-font-size);
    font-weight: var(--e-global-typography-accent-font-weight);
    text-transform: var(--e-global-typography-accent-text-transform);
    color: var(--e-global-color-91d8ab5);
    letter-spacing: 0.5px;
    padding: 6px 26px;
    border-radius: 4px;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease);
}

/* Subtle gold sparkle accents, decorative only */
.oracle-invite-friend::after {
    content: "\2726";
    position: absolute;
    bottom: 10px;
    right: 14px;
    color: var(--gold);
    font-size: 11px;
    opacity: 0.5;
    pointer-events: none;
}

/* At-limit / "thanks for growing the circle" state — quieter plum tone
   instead of the pink invite-y treatment, since there's nothing to ask
   for right now. */
.oracle-invite-friend.is-at-limit {
    background: var(--plum-soft);
    border-color: var(--plum);
}

.oracle-invite-friend.is-at-limit .invite-heading {
    color: var(--plum);
}

.oracle-invite-friend.is-at-limit::before {
    background:
        linear-gradient(135deg, rgba(107, 45, 92, 0.15) 50%, transparent 50%),
        linear-gradient(-135deg, rgba(107, 45, 92, 0.15) 50%, transparent 50%);
    background-size: 50% 100%;
    background-position: left top, right top;
    background-repeat: no-repeat;
}

.invite-body p {
    margin-bottom: 10px !important;
}

h3.invite-heading {
    margin-bottom: 0.25em !important;
}

.oracle-invite-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pink);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.4px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease);
}

.oracle-invite-copy-btn.is-copied {
    background: var(--gold);
}

.oracle-invite-copy-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: var(--plum);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ease), transform var(--ease);
    z-index: 10;
}

/* Small triangle pointing up at the button */
.oracle-invite-copy-btn::after {
    content: "";
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--plum);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ease);
    z-index: 10;
}

.oracle-invite-copy-btn:hover::before,
.oracle-invite-copy-btn:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.oracle-invite-copy-btn:hover::after,
.oracle-invite-copy-btn:focus-visible::after {
    opacity: 1;
}

/* =============================================================
   Card grid responsive
   ============================================================= */

@media (max-width: 1024px) {
    .card { width: calc(33.333% - 20px); }
}

@media (max-width: 768px) {
    .card { width: calc(50% - 20px); }
    .reading-form input { width: 50%; }
}

@media (max-width: 480px) {
    .card { width: calc(100% - 20px); }
}

@media (max-width: 768px) {
    .card { min-width: 100%; }
}

/* =============================================================
   AI vs Database Reading Type Selector
   ============================================================= */

.reading-type-selector {
    margin: 0;
    padding: 20px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
}

.reading-type-selector h3 {
    font-family: var(--font-display);
    color: var(--ink);
    font-size: 2em;
    margin: 0 0 20px 0;
    text-align: center;
    font-weight: 700;
}

.reading-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.reading-type-option {
    position: relative;
    cursor: pointer;
    display: block;
}

.reading-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-content {
    background: var(--white);
    border: 2px solid var(--line-strong);
    border-radius: var(--radius-md);
    padding: 25px 20px;
    text-align: center;
    transition: all var(--ease);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.reading-type-option:hover .option-content {
    border-color: var(--pink);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.reading-type-option input[type="radio"]:checked + .option-content {
    border-color: var(--pink);
    border-width: 3px;
    background: var(--pink-soft);
    box-shadow: var(--shadow-lg);
}

.reading-type-option.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.reading-type-option.disabled .option-content {
    background: #f5f5f5;
}

.option-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.option-title {
    font-family: var(--font-display);
    font-size: 1.5em;
    color: var(--pink);
    margin: 10px 0;
    font-weight: 600;
}

.option-description {
    color: var(--muted);
    font-size: 0.95em;
    margin: 10px 0;
    line-height: 1.4;
}

.option-credits {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
    font-size: 0.9em;
}

.option-credits .unlimited {
    color: var(--pink);
    font-weight: 600;
    font-size: 1.1em;
}

.option-credits .credits {
    color: var(--muted);
    font-weight: 500;
}

.option-credits .depleted {
    color: var(--warning);
    font-weight: 500;
}

.option-credits .depleted a {
    color: var(--pink);
    text-decoration: underline;
    font-weight: 600;
}

/* =============================================================
   AI / DB badges on results
   ============================================================= */

.ai-badge,
.db-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 15px;
}

.ai-badge {
    background: linear-gradient(135deg, var(--pink), var(--plum));
    color: var(--white);
}

.db-badge {
    background: var(--bg-soft);
    color: var(--muted);
    border: 2px solid var(--line-strong);
}

/* =============================================================
   AI Reading Cards Layout
   ============================================================= */

.ai-cards-drawn ul {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    justify-content: center;
}

.ai-cards-drawn li {
    flex: 1 1 auto;
    max-width: calc(20% - 20px);
    min-width: 150px;
}

.ai-cards-drawn .card-mini-image {
    max-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-cards-drawn .card-mini-image img {
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .ai-cards-drawn li {
        max-width: 100%;
        min-width: 100%;
    }

    .ai-cards-drawn .card-mini-image,
    .ai-cards-drawn .card-mini-image img {
        max-height: 500px;
    }
}

.ai-cards-drawn ul:has(li:nth-child(-n+2)):not(:has(li:nth-child(3))) li {
    max-width: 300px;
}

/* AI Saved Readings — match Fresh Reading layout */
.ai-cards-drawn {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
}

.ai-card-item {
    flex: 1 1 auto;
    max-width: calc(20% - 20px);
    min-width: 150px;
    text-align: center;
}

.ai-card-image {
    max-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.ai-card-image img {
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ai-card-info {
    font-size: 20px;
}

.ai-card-info p:first-of-type,
.ai-card-info strong {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.ai-card-info p:nth-of-type(2),
.ai-card-info em {
    display: block;
    font-size: 16px;
    color: var(--muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .ai-card-item {
        max-width: 100%;
        min-width: 100%;
    }

    .ai-card-image img {
        max-height: 500px;
    }
}

.ai-cards-drawn:has(.ai-card-item:nth-child(-n+2)):not(:has(.ai-card-item:nth-child(3))) .ai-card-item {
    max-width: 300px;
}

/* =============================================================
   Spread Selection / Reading Focus
   ============================================================= */

.spread-selection,
.reading-focus {
    margin: 20px 0;
}

.spread-selection h3,
.reading-focus h3 {
    font-family: var(--font-display);
    color: var(--pink);
    font-size: 1.5em;
    margin: 0 0 10px 0;
}

/* =============================================================
   Privacy Option
   ============================================================= */

.privacy-option {
    margin: 20px 0;
    padding: 15px;
    background: var(--pink-soft);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--pink);
}

.privacy-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.privacy-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--pink);
}

/* =============================================================
   Get Reading Button (the big call-to-action)
   ============================================================= */

.get-reading-btn {
    background: var(--pink);
    color: var(--white);
    padding: 15px 40px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ease);
    margin-top: 20px;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md);
}

.get-reading-btn:hover {
    background: var(--pink-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.get-reading-btn:active {
    background: var(--pink-deep);
    transform: translateY(0);
}

/** logout button **/

.cs-logout-link {
    display: inline-block;
    background: #FFFFFF;
    color: #F70F9F !important;
    padding: 8px 13px;
    border: dotted 3px #F70F9F;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-logout-link:active {
    transform: translateY(0);
}

/* =============================================================
   Shared brand hover treatment
   -------------------------------------------------------------
   Used to be declared five separate times, once per button
   (.invite-cta, .oracle-invite-copy-btn, its "button." variant,
   .cs-logout-link). One rule now, same visual result everywhere.
   Add a new selector to this list any time a new Oracle-branded
   button needs the same hover treatment.
   ============================================================= */

.oracle-invite-friend .invite-cta:hover,
.oracle-invite-copy-btn:hover,
.cs-logout-link:hover {
    background-color: var(--hover-bg);
    color: #0C0C0C !important;
    border-style: dotted;
    border-width: 3px;
    border-color: var(--hover-border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .reading-type-options {
        grid-template-columns: 1fr;
    }

    .option-content {
        min-height: auto;
    }
}