/**
 * MBR Core Suite — Frontend Components Styles
 * Loaded conditionally by MBR_Assets::enqueue_frontend_components().
 * Covers: Dynamic Card Grid, Dynamic Breadcrumb, Clickable Loop Cards,
 * Video Popup Modal, and Gated PDF Modal.
 *
 * Location: assets/css/frontend-components.css
 * @since 4.0.0
 */

/* ==========================================================================
   1. DYNAMIC CARD GRID
   ========================================================================== */
.mbr-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.mbr-card-grid-item {
    background: linear-gradient(145deg, var(--mbr-primary, #081F3D) 0%, var(--mbr-accent, #063375) 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 10px 25px -8px rgba(8, 31, 61, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mbr-card-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -10px rgba(8, 31, 61, 0.35);
}

.mbr-card-grid-item h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.mbr-card-grid-item p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.9);
}

/* ==========================================================================
   2. DYNAMIC BREADCRUMB
   ========================================================================== */
.mbr-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mbr-breadcrumb a {
    color: var(--mbr-accent, #063375);
    text-decoration: none;
    font-weight: 500;
}

.mbr-breadcrumb a:hover {
    text-decoration: underline;
}

.mbr-breadcrumb-sep {
    opacity: 0.5;
    user-select: none;
}

.mbr-breadcrumb-current {
    font-weight: 600;
    opacity: 0.85;
}

/* ==========================================================================
   3. CLICKABLE LOOP CARDS & COVER MEDIA FIXES
   ========================================================================== */
.mbr-clickable-card {
    cursor: pointer;
    position: relative;
}

.mbr-cover-media img,
.mbr-cover-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   4. SHARED MODAL ENGINE (VIDEO POPUP & GATED PDF)
   ========================================================================== */
.mbr-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(8, 31, 61, 0.78);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mbr-modal-overlay.is-open {
    display: flex;
}

.mbr-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
}

.mbr-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: rgba(8, 31, 61, 0.85);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mbr-modal-close:hover {
    background: var(--mbr-accent, #063375);
}

.mbr-modal-video-ratio {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000000;
}

.mbr-modal-video-ratio iframe,
.mbr-modal-video-ratio video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.mbr-modal-pdf-body {
    padding: 28px;
    overflow-y: auto;
}

.mbr-modal-pdf-frame {
    width: 100%;
    height: 75vh;
    border: 0;
    display: block;
}