/* ========================================================================
   Mixed Posts Shortcode Styles
   Unified styling for [mixed_posts] shortcode
   All classes use bf- prefix for namespacing
   ======================================================================== */

/* ========================================================================
   Container & Layout
   ======================================================================== */
.bf-mixed-posts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--bf-font-primary, 'Fredoka', sans-serif);
    background: transparent;
    box-sizing: border-box;
}

/* ========================================================================
   Card Grid Layout
   ======================================================================== */
.bf-mixed-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

/* ========================================================================
   Card Link Wrapper
   ======================================================================== */
.bf-mixed-posts-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.bf-mixed-posts-card-link:hover {
    transform: translateY(-5px);
    text-decoration: none;
    color: inherit;
}

/* ========================================================================
   Mixed Posts Card - Main Styling
   ======================================================================== */
.bf-mixed-posts-card {
    position: relative;
    display: flex;
    flex-direction: row;
    background: linear-gradient(75deg, rgba(126, 217, 87, 0.08), rgba(255, 255, 0, 0.05));
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(126, 217, 87, 0.4);
    border-radius: 12px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(126, 217, 87, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
    height: 120px;
}

.bf-mixed-posts-card:hover {
    border-color: var(--bf-color-primary, #7ed957);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(126, 217, 87, 0.3),
        0 0 30px rgba(255, 255, 0, 0.1);
}

/* ========================================================================
   Slanted Ribbon Badge (Provider name for kampagne)
   Diagonal corner ribbon that stays within the card container
   ======================================================================== */
.bf-mixed-posts-badge {
    position: absolute;
    top: 12px;
    left: -35px;
    width: 120px;
    background: linear-gradient(180deg, var(--bf-color-primary, #7ed957) 0%, #5cb842 100%);
    color: #000000;
    font-size: 7px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 0;
    z-index: 10;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: rotate(-45deg);
}

.bf-mixed-posts-card-link:hover .bf-mixed-posts-badge {
    filter: brightness(1.1);
}

/* Badge colors matching category badge colors */
.bf-mixed-posts-card--anmeldelse .bf-mixed-posts-badge {
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
}

.bf-mixed-posts-card--spillemaskine .bf-mixed-posts-badge {
    background: linear-gradient(180deg, #9b59b6 0%, #8e44ad 100%);
    color: #ffffff;
}

.bf-mixed-posts-card--kampagne .bf-mixed-posts-badge {
    background: linear-gradient(180deg, var(--bf-color-primary, #7ed957) 0%, #5cb842 100%);
    color: #000000;
}

.bf-mixed-posts-card--welcome .bf-mixed-posts-badge {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: #ffffff;
}

.bf-mixed-posts-card--spilforslag .bf-mixed-posts-badge {
    background: linear-gradient(180deg, var(--bf-color-accent, #ffff00) 0%, #e6e600 100%);
    color: #000000;
}

.bf-mixed-posts-card--vundet .bf-mixed-posts-badge {
    background: linear-gradient(180deg, var(--bf-color-primary, #7ed957) 0%, #5cb842 100%);
    color: #000000;
}

.bf-mixed-posts-card--tabt .bf-mixed-posts-badge {
    background: linear-gradient(180deg, var(--bf-color-danger, #ff5555) 0%, #e04444 100%);
    color: #ffffff;
}

.bf-mixed-posts-card--post .bf-mixed-posts-badge {
    background: linear-gradient(180deg, #e67e22 0%, #d35400 100%);
    color: #ffffff;
}

.bf-mixed-posts-card--risikofrit .bf-mixed-posts-badge {
    background: linear-gradient(135deg, #00bcd4, #009688);
    color: #ffffff;
}

.bf-mixed-posts-card--freespins .bf-mixed-posts-badge {
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    color: #ffffff;
}

/* ========================================================================
   Image Section
   ======================================================================== */
.bf-mixed-posts-image {
    flex-shrink: 0;
    width: 90px;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-right: 1px solid rgba(126, 217, 87, 0.2);
    box-sizing: border-box;
    border-radius: 10px 0 0 10px;
    overflow: hidden;
}

.bf-mixed-posts-image img {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

/* Full-bleed images for post types with 1200x630 images (indlæg, kampagne) */
.bf-mixed-posts-card--post .bf-mixed-posts-image,
.bf-mixed-posts-card--kampagne .bf-mixed-posts-image,
.bf-mixed-posts-card--welcome .bf-mixed-posts-image,
.bf-mixed-posts-card--risikofrit .bf-mixed-posts-image,
.bf-mixed-posts-card--freespins .bf-mixed-posts-image {
    padding: 0;
    background: transparent;
}

.bf-mixed-posts-card--post .bf-mixed-posts-image img,
.bf-mixed-posts-card--kampagne .bf-mixed-posts-image img,
.bf-mixed-posts-card--welcome .bf-mixed-posts-image img,
.bf-mixed-posts-card--risikofrit .bf-mixed-posts-image img,
.bf-mixed-posts-card--freespins .bf-mixed-posts-image img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border-radius: 10px 0 0 10px;
}

/* Override for fallback logo images - use contained display instead of cover */
/* High specificity to override kampagne/post full-bleed styles */
.bf-mixed-posts-card .bf-mixed-posts-image.bf-mixed-posts-image--logo,
.bf-mixed-posts-card--kampagne .bf-mixed-posts-image.bf-mixed-posts-image--logo,
.bf-mixed-posts-card--welcome .bf-mixed-posts-image.bf-mixed-posts-image--logo,
.bf-mixed-posts-card--risikofrit .bf-mixed-posts-image.bf-mixed-posts-image--logo,
.bf-mixed-posts-card--freespins .bf-mixed-posts-image.bf-mixed-posts-image--logo,
.bf-mixed-posts-card--post .bf-mixed-posts-image.bf-mixed-posts-image--logo,
.bf-mixed-posts-image--logo {
    padding: 10px !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

.bf-mixed-posts-card .bf-mixed-posts-image.bf-mixed-posts-image--logo img,
.bf-mixed-posts-card--kampagne .bf-mixed-posts-image.bf-mixed-posts-image--logo img,
.bf-mixed-posts-card--welcome .bf-mixed-posts-image.bf-mixed-posts-image--logo img,
.bf-mixed-posts-card--risikofrit .bf-mixed-posts-image.bf-mixed-posts-image--logo img,
.bf-mixed-posts-card--freespins .bf-mixed-posts-image.bf-mixed-posts-image--logo img,
.bf-mixed-posts-card--post .bf-mixed-posts-image.bf-mixed-posts-image--logo img,
.bf-mixed-posts-image--logo img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 60px !important;
    object-fit: contain !important;
    border-radius: 6px !important;
}

.bf-mixed-posts-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(126, 217, 87, 0.2), rgba(255, 255, 0, 0.1));
    border-radius: 8px;
    border: 1px dashed rgba(126, 217, 87, 0.3);
}

/* ========================================================================
   Content Section
   ======================================================================== */
.bf-mixed-posts-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    box-sizing: border-box;
}

/* ========================================================================
   Category Badge - High specificity to override theme
   ======================================================================== */
.bf-mixed-posts-container .bf-mixed-posts-category,
.bf-mixed-posts-category,
span.bf-mixed-posts-category {
    display: inline-block !important;
    width: fit-content !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    font-size: 8px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1 !important;
    margin: 0 !important;
    font-family: var(--bf-font-primary, 'Fredoka', sans-serif) !important;
}

/* Category Colors */
.bf-mixed-posts-category--anmeldelse {
    background: #3498db;
    color: #ffffff;
}

.bf-mixed-posts-category--spillemaskine {
    background: #9b59b6;
    color: #ffffff;
}

.bf-mixed-posts-category--kampagne {
    background: var(--bf-color-primary, #7ed957);
    color: #000000;
}

.bf-mixed-posts-category--welcome {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: #ffffff;
}

.bf-mixed-posts-category--spilforslag {
    background: var(--bf-color-accent, #ffff00);
    color: #000000;
}

.bf-mixed-posts-category--vundet {
    background: var(--bf-color-primary, #7ed957);
    color: #000000;
}

.bf-mixed-posts-category--tabt {
    background: var(--bf-color-danger, #ff5555);
    color: #ffffff;
}

.bf-mixed-posts-category--post {
    background: #e67e22;
    color: #ffffff;
}

.bf-mixed-posts-category--risikofrit {
    background: linear-gradient(135deg, #00bcd4, #009688);
    color: #ffffff;
}

.bf-mixed-posts-category--freespins {
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    color: #ffffff;
}

/* ========================================================================
   Date - High specificity to override theme
   ======================================================================== */
.bf-mixed-posts-container .bf-mixed-posts-date,
.bf-mixed-posts-date,
span.bf-mixed-posts-date {
    font-size: 9px !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--bf-font-primary, 'Fredoka', sans-serif) !important;
    text-transform: none !important;
}

/* ========================================================================
   Title - Using high specificity to override theme styles
   ======================================================================== */
.bf-mixed-posts-container .bf-mixed-posts-card .bf-mixed-posts-title,
.bf-mixed-posts-title,
h3.bf-mixed-posts-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #ffffff !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-family: var(--bf-font-primary, 'Fredoka', sans-serif) !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    border: none !important;
    background: none !important;
}

/* Title Colors - Match category label colors */
.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--anmeldelse .bf-mixed-posts-title {
    color: #3498db !important;
}

.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--spillemaskine .bf-mixed-posts-title {
    color: #9b59b6 !important;
}

.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--kampagne .bf-mixed-posts-title {
    color: var(--bf-color-primary, #7ed957) !important;
}

.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--welcome .bf-mixed-posts-title {
    color: #f39c12 !important;
}

.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--spilforslag .bf-mixed-posts-title {
    color: var(--bf-color-accent, #ffff00) !important;
}

.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--vundet .bf-mixed-posts-title {
    color: var(--bf-color-primary, #7ed957) !important;
}

.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--tabt .bf-mixed-posts-title {
    color: var(--bf-color-danger, #ff5555) !important;
}

.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--post .bf-mixed-posts-title {
    color: #e67e22 !important;
}

.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--risikofrit .bf-mixed-posts-title {
    color: #00bcd4 !important;
}

.bf-mixed-posts-container .bf-mixed-posts-card.bf-mixed-posts-card--freespins .bf-mixed-posts-title {
    color: #e91e63 !important;
}

/* ========================================================================
   Subtitle
   ======================================================================== */
.bf-mixed-posts-subtitle {
    font-size: 10px;
    color: var(--bf-color-primary, #7ed957);
    font-weight: 500;
    margin-top: auto;
}

/* ========================================================================
   Empty State
   ======================================================================== */
.bf-mixed-posts-empty {
    text-align: center;
    color: #aaaaaa;
    font-size: 16px;
    padding: 50px 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px dashed rgba(126, 217, 87, 0.3);
    border-radius: 12px;
    margin: 20px 0;
}

/* ========================================================================
   Responsive Design - Tablets
   ======================================================================== */
@media (max-width: 768px) {
    .bf-mixed-posts-container {
        margin: 0;
        padding: 10px;
        max-width: none;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .bf-mixed-posts-grid {
        padding: 0 10px;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bf-mixed-posts-image {
        width: 30%;
        padding: 8px;
    }

    .bf-mixed-posts-content {
        padding: 12px;
    }
}

/* ========================================================================
   Responsive Design - Mobile
   ======================================================================== */
@media (max-width: 480px) {
    .bf-mixed-posts-card {
        height: 110px;
    }

    .bf-mixed-posts-image {
        width: 30%;
        padding: 8px;
    }

    .bf-mixed-posts-image img {
        max-height: 50px;
    }

    .bf-mixed-posts-content {
        padding: 10px;
        gap: 4px;
    }

    .bf-mixed-posts-container .bf-mixed-posts-card .bf-mixed-posts-title,
    .bf-mixed-posts-title,
    h3.bf-mixed-posts-title {
        font-size: 12px !important;
    }

    .bf-mixed-posts-category {
        font-size: 7px;
        padding: 2px 6px;
    }

    .bf-mixed-posts-date {
        font-size: 8px;
    }

    .bf-mixed-posts-subtitle {
        font-size: 9px;
    }

    .bf-mixed-posts-badge {
        font-size: 6px;
        padding: 3px 0;
        top: 10px;
        left: -30px;
        width: 100px;
    }
}
