/**
 * Branwell Tarot — plugin styles
 * Handle: bw-styles-tarot
 *
 * Option B editorial layout: card image as visual hero on the left,
 * body text as a magazine column on the right. No outer card box —
 * fully transparent root, just typography + the tilted card image
 * sitting on whatever background the theme provides.
 *
 * Scope: all rules under #bw-tarot-panel so nothing leaks.
 *
 * Plugin owns:
 *   - 2-column layout (card image / body)
 *   - card image sizing + slight tilt
 *   - eyebrow rhythm + small-caps keyword line
 *   - italic period on the title for editorial flourish
 *
 * Plugin does NOT own:
 *   - body font, body colour, container max-width  (theme owns)
 *   - h2 base styling (theme drives — serif Poppins via theme)
 *   - paragraph defaults
 *
 * Palette: every colour via var(--color-*) tokens. No fonts.
 */

#bw-tarot-panel {
    box-sizing: border-box;
    width: 100%;
    /* No horizontal padding or margin on root — theme content wrapper
       controls width. Top/bottom margin matches the shared section
       header rhythm (4rem top, 2rem bottom) so sections breathe
       consistently across the site. */
    margin: 4rem 0 2rem;
    padding: 0;
    background: transparent;
    /* Editorial 2-column layout. Card image fills a 160px track; body
       takes the rest. Vertical alignment center so the card and body
       sit on the same optical line. */
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 36px;
    align-items: center;
}
#bw-tarot-panel *,
#bw-tarot-panel *::before,
#bw-tarot-panel *::after {
    box-sizing: border-box;
}

/* ============================================================
   Card image — visual hero
   ============================================================ */
#bw-tarot-panel .bw-tarot__card-image {
    width: 160px;
    height: auto;
    /* Slight tilt for editorial feel — signals "physical card" rather
       than "icon". Subtle enough to read as intentional, not playful. */
    transform: rotate(-2deg);
    transition: transform 0.4s ease;
}
#bw-tarot-panel .bw-tarot__card-image:hover {
    transform: rotate(0deg);
}
#bw-tarot-panel .bw-tarot__card-image img,
#bw-tarot-panel .bw-tarot__card-image svg {
    display: block;
    width: 100%;
    height: auto;
    /* Soft shadow gives the card lift without dropshadow being heavy.
       Uses palette-primary at low alpha so it tints with the customizer. */
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.12));
    border-radius: 8px;
}

/* ============================================================
   Body column
   ============================================================ */
#bw-tarot-panel .bw-tarot__body {
    min-width: 0;     /* allow text wrapping inside grid */
}

/* Eyebrow — small letterspaced uppercase, palette-primary colour.
   Card number and "Major arcana" fold in here, separated by middots,
   so we don't need a separate right-hand widget. */
#bw-tarot-panel .bw-tarot__eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0 0 10px;
    line-height: 1.4;
}
#bw-tarot-panel .bw-tarot__eyebrow-sep {
    margin: 0 6px;
    opacity: 0.5;
}

/* Title — uses theme h2 styling for the display feel.
   Inherits font-family from theme. */
#bw-tarot-panel .bw-tarot__title {
    margin: 0 0 14px;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.05;
    color: inherit;
}

/* Keywords — palette-tinted pills.
   Background uses --color-background-info, text uses --color-primary,
   subtle border. Re-themes automatically with the customizer. */
#bw-tarot-panel .bw-tarot__keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
}
#bw-tarot-panel .bw-tarot__keyword {
    display: inline-block;
    padding: 4px 14px;
    /* Soft surface tint as background (same token mega menu panels use),
       palette-primary as text colour. This is the editorial-tag look:
       quiet background, brand-coloured label. */
    background: var(--color-bg-soft);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Description — fills the full right column width */
#bw-tarot-panel .bw-tarot__description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: inherit;
    opacity: 0.8;
}
#bw-tarot-panel .bw-tarot__description p {
    margin: 0 0 0.8em;
}
#bw-tarot-panel .bw-tarot__description p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   Error / empty state
   ============================================================ */
#bw-tarot-panel .bw-tarot__error,
#bw-tarot .bw-tarot__error {
    margin: 0;
    padding: 1rem 0;
    color: inherit;
    opacity: 0.6;
    font-size: 0.95rem;
}

/* ============================================================
   Responsive — stack vertically below tablet
   ============================================================ */
@media (max-width: 768px) {
    #bw-tarot-panel {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: left;
        margin-top: 2.5rem;
    }
    #bw-tarot-panel .bw-tarot__card-image {
        width: 130px;
        /* Less tilt on mobile so it doesn't take extra horizontal space */
        transform: rotate(-1deg);
    }
    #bw-tarot-panel .bw-tarot__title {
        font-size: 1.65rem;
    }
}
@media (max-width: 480px) {
    #bw-tarot-panel .bw-tarot__card-image {
        width: 110px;
    }
    #bw-tarot-panel .bw-tarot__title {
        font-size: 1.45rem;
    }
    #bw-tarot-panel .bw-tarot__eyebrow {
        font-size: 0.65rem;
        letter-spacing: 0.14em;
    }
    #bw-tarot-panel .bw-tarot__keywords {
        font-size: 0.72rem;
    }
}
