/* ============================================
   PizzaLogic Bake Log
   Layered on top of blog.css — only contains
   bake-log-specific additions and overrides.
   ============================================ */

/* --- Retroactive tags --- */

.bake-log-backfilled-tag-inline {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--label-color);
    background: var(--tip-bg);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: lowercase;
    letter-spacing: 0;
}

.bake-log-backfilled-tag {
    font-size: 0.78em;
    font-weight: 600;
    background: var(--tip-bg);
    color: var(--label-color);
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: help;
    margin-left: 4px;
}

/* --- Recipe summary card (in-page placement of the share Summary Card) --- */
/*
 * The .summary-card / .summary-card-* classes are defined in styles.css and
 * styled for the modal share overlay (centered, fixed position). When we
 * embed the same card in the body of a bake-log post, we strip the modal
 * positioning, narrow it to roughly mobile width so it doesn't dominate
 * desktop reading flow, and theme it via --primary-start / --primary-end
 * so it follows the user's selected color scheme.
 */

.bake-log-summary-card {
    position: static;
    transform: none;
    margin: 0 auto 24px;
    max-width: 380px;
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-start, #1e2a4a) 0%, var(--primary-end, #16213e) 100%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.bake-log-recipe-cta {
    display: block;
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    text-align: center;
    text-decoration: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.bake-log-recipe-cta:hover,
.bake-log-recipe-cta:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* --- Photo gallery (sits outside .blog-post-body so it spans the article) --- */

.bake-log-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    padding: 0 24px;
    margin: 0 0 24px;
}

.bake-log-gallery-item {
    margin: 0;
}

.bake-log-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.bake-log-gallery-item figcaption {
    font-size: 0.85em;
    color: var(--label-color);
    margin-top: 6px;
    line-height: 1.4;
}

/* --- YouTube embed + locally-hosted video --- */

.bake-log-video {
    position: relative;
    width: calc(100% - 48px);
    aspect-ratio: 16 / 9;
    margin: 0 24px 24px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

/* Portrait videos (e.g. YouTube Shorts at 9:16, vertical phone clips). */
.bake-log-video--portrait {
    width: min(380px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}

.bake-log-video iframe,
.bake-log-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

/* --- Lightbox (clickable images) --- */

.bl-lightbox-trigger {
    cursor: zoom-in;
}

.bl-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 32px 20px;
    cursor: zoom-out;
}

.bl-lightbox.open {
    display: flex;
}

.bl-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.bl-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    color: white;
    border: 0;
    font-size: 2.5em;
    line-height: 1;
    padding: 4px 12px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.bl-lightbox-close:hover,
.bl-lightbox-close:focus {
    opacity: 0.7;
    outline: none;
}

@media (max-width: 640px) {
    .bake-log-summary-card {
        max-width: 100%;
        padding: 18px;
    }

    .bake-log-gallery,
    .bake-log-video {
        padding-left: 16px;
        padding-right: 16px;
    }

    .bake-log-video {
        width: calc(100% - 32px);
        margin-left: 16px;
        margin-right: 16px;
    }
}
