/**
 * GLM Offers — Frontend Styles
 *
 * These are intentionally minimal base styles. They provide structure
 * without imposing colors or fonts, so theme overrides are straightforward.
 *
 * Override by either:
 *   1. Adding more specific CSS in your theme stylesheet.
 *   2. Copying this file and enqueuing your version instead.
 *
 * @package GLM_Offers
 */

/* ==========================================================================
   Base
   ========================================================================== */

.glm-offer {
    box-sizing: border-box;
}

.glm-offer *,
.glm-offer *::before,
.glm-offer *::after {
    box-sizing: inherit;
}

/* ==========================================================================
   Sidebar Template
   ========================================================================== */

.glm-offer--sidebar {
    padding: 20px;
    border-radius: 6px;
    background: #1a1a2e;
    color: #ffffff;
    text-align: center;
}

.glm-offer--sidebar .glm-offer__headline {
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.glm-offer--sidebar .glm-offer__subheadline {
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 12px;
}

.glm-offer--sidebar .glm-offer__description {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 16px;
    opacity: 0.9;
}

.glm-offer--sidebar .glm-offer__cta {
    margin-bottom: 12px;
}

.glm-offer--sidebar .glm-offer__cta-button {
    display: inline-block;
    padding: 10px 24px;
    background: #ffffff;
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.glm-offer--sidebar .glm-offer__cta-button:hover {
    opacity: 0.85;
}

.glm-offer--sidebar .glm-offer__fine-print {
    font-size: 0.75em;
    opacity: 0.7;
    line-height: 1.4;
}

/* ==========================================================================
   Popup Template
   ========================================================================== */

.glm-offer--popup {
    padding: 32px;
    text-align: center;
}

.glm-offer__headline--popup {
    font-size: 1.3em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.glm-offer__subheadline--popup {
    font-size: 1.8em;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.glm-offer__description--popup {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 24px;
}

.glm-offer__cta--popup {
    margin-bottom: 16px;
}

.glm-offer__cta-button--popup {
    display: inline-block;
    padding: 14px 36px;
    background: #e63946;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.glm-offer__cta-button--popup:hover {
    background: #c1303d;
}

.glm-offer__fine-print--popup {
    font-size: 0.8em;
    opacity: 0.6;
    line-height: 1.4;
}

/* ==========================================================================
   Inline Banner Template
   ========================================================================== */

.glm-offer--inline-banner {
    padding: 16px 24px;
    border-radius: 6px;
    background: #f0f4f8;
    border-left: 4px solid #2b6cb0;
}

.glm-offer__inline-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.glm-offer__inline-text {
    flex: 1;
    min-width: 200px;
}

.glm-offer__headline--inline {
    font-weight: 700;
    margin-right: 8px;
}

.glm-offer__subheadline--inline {
    font-weight: 400;
}

.glm-offer__fine-print--inline {
    display: block;
    font-size: 0.8em;
    opacity: 0.6;
    margin-top: 4px;
}

.glm-offer__cta-button--inline {
    display: inline-block;
    padding: 10px 20px;
    background: #2b6cb0;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.glm-offer__cta-button--inline:hover {
    background: #225593;
}

/* ==========================================================================
   Offer List ([glm_offers_list])
   ========================================================================== */

.glm-offers-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==========================================================================
   Fallback

   The fallback markup carries the requesting template's modifier class
   alongside .glm-offer--fallback, so it inherits that template's panel
   chrome. Left alone, a fallback rendered with template="sidebar" picks up
   the dark #1a1a2e card and white text; with "inline-banner" it picks up the
   blue accent panel. Reset those here, at a specificity the single-class
   template rules above cannot beat, so the message stays legible in every
   placement.
   ========================================================================== */

.glm-offer.glm-offer--fallback {
    background: #f7f7f8;
    color: inherit;
    border: 1px solid #e6e8ea;
    border-radius: 4px;
    padding: 16px;
    text-align: center;
}

.glm-offer__fallback-message {
    font-style: italic;
    opacity: 0.8;
}

/* ==========================================================================
   Image-based Offers (all templates)
   ========================================================================== */

.glm-offer__image-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.glm-offer__image-link {
    display: block;
    transition: opacity 0.2s ease;
}

.glm-offer__image-link:hover {
    opacity: 0.9;
}

/* ==========================================================================
   Header Image (text-based offers, all templates)
   ========================================================================== */

/*
 * overflow:hidden on the card clips the header band to the card's border-radius.
 * Negative margins pull the band outside the card's padding to bleed edge-to-edge.
 */

.glm-offer--sidebar,
.glm-offer--popup,
.glm-offer--inline-banner {
    overflow: hidden;
}

.glm-offer__header-image-wrap {
    margin: -20px -20px 16px;
    min-height: 8px; /* Visible even when no image — shows bg_color band only */
    display: flex;
    justify-content: center;
    align-items: center;
}

.glm-offer__header-image-wrap--popup {
    margin: -32px -32px 20px;
}

.glm-offer__header-image-wrap--inline-banner {
    margin: -16px -24px 12px;
}

.glm-offer__header-image {
    display: block;
    max-width: 100%;
    height: auto;
}
