/**
 * Betformatics Layout CTA Kampagne Welcome Bonus Styles
 * Self-contained styles for the welcome bonus shortcode
 *
 * Dependencies: betformatics-variables (loaded via PHP)
 *
 * @package Betformatics
 */

/* =============================================================================
   RESET - Prevent WP/Elementor style inheritance
   ============================================================================= */
.bf-welcome-outer,
.bf-welcome-outer * {
    box-sizing: border-box !important;
}

.bf-welcome-outer a {
    text-decoration: none !important;
}

/* =============================================================================
   OUTER CONTAINER - Holds heading + card
   ============================================================================= */
.bf-welcome-outer {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 20px 0;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

/* =============================================================================
   HEADING - "Ny spiller hos X?" (above the card)
   ============================================================================= */
.bf-welcome-heading {
    font-size: 16px;
    font-weight: 600;
    color: var(--bf-text-primary, #1a1a1a);
    margin: 0 0 8px 0;
    padding: 0;
    line-height: 1.4;
}

/* =============================================================================
   WRAPPER - Card container
   ============================================================================= */
.bf-welcome-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 !important;
    background: var(--bf-white, #ffffff) !important;
    border: 1px solid var(--bf-border, #e5e7eb) !important;
    border-radius: var(--bf-radius-lg, 12px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* =============================================================================
   LOGO SECTION - Brand color background with centered logo
   ============================================================================= */
.bf-welcome-logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 120px;
    padding: 24px;
}

.bf-welcome-logo-section img {
    max-width: 160px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* =============================================================================
   CONTENT SECTION
   ============================================================================= */
.bf-welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 24px 10px 24px;
    gap: 8px;
}

/* Title */
.bf-welcome-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--bf-text-primary, #1a1a1a);
    line-height: 1.3;
    margin: 0;
}

/* Subtitle */
.bf-welcome-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--bf-text-muted, #6b7280);
    line-height: 1.4;
    margin: 0;
}

/* =============================================================================
   BUTTON - with !important to override WP/Elementor
   ============================================================================= */
.bf-welcome-wrapper a.bf-welcome-button,
a.bf-welcome-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 8px !important;
    padding: 12px 32px !important;
    background-color: var(--bf-primary, #1848A0) !important;
    color: var(--bf-white, #ffffff) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-align: center !important;
    border-radius: var(--bf-radius-base, 8px) !important;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
    cursor: pointer !important;
    box-shadow: 0 2px 4px rgba(24, 72, 160, 0.3) !important;
    white-space: nowrap !important;
    border: none !important;
}

.bf-welcome-wrapper a.bf-welcome-button:hover,
a.bf-welcome-button:hover {
    background-color: var(--bf-primary-hover, #0f3470) !important;
    color: var(--bf-white, #ffffff) !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(24, 72, 160, 0.4) !important;
}

.bf-welcome-wrapper a.bf-welcome-button:active,
a.bf-welcome-button:active {
    transform: translateY(0) !important;
}

.bf-welcome-wrapper a.bf-welcome-button:visited,
a.bf-welcome-button:visited {
    color: var(--bf-white, #ffffff) !important;
}

/* =============================================================================
   TERMS - Collapsible
   ============================================================================= */
.bf-welcome-terms {
    position: relative;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    padding-right: 28px;
    border-top: 1px solid var(--bf-gray-100, #f3f4f6);
    font-size: 10px;
    line-height: 1.4;
    color: #888;
    font-style: italic;
    text-align: center;
}

.bf-welcome-terms a {
    color: var(--bf-primary, #1848A0) !important;
    text-decoration: underline !important;
}

.bf-welcome-terms-short {
    display: block;
}

.bf-welcome-terms-full {
    display: none;
}

.bf-welcome-terms-full p {
    margin: 0 !important;
    padding: 0 !important;
}

.bf-welcome-terms.is-expanded .bf-welcome-terms-short {
    display: none;
}

.bf-welcome-terms.is-expanded .bf-welcome-terms-full {
    display: block;
}

/* Toggle button */
.bf-welcome-terms-toggle {
    position: absolute;
    top: 12px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 2px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #999;
}

.bf-welcome-terms-toggle:hover,
.bf-welcome-terms-toggle:focus,
.bf-welcome-terms-toggle:active {
    color: #666;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.bf-welcome-terms-toggle .bf-arrow-up {
    display: none;
}

.bf-welcome-terms-toggle .bf-arrow-down {
    display: block;
}

.bf-welcome-terms.is-expanded .bf-welcome-terms-toggle .bf-arrow-up {
    display: block;
}

.bf-welcome-terms.is-expanded .bf-welcome-terms-toggle .bf-arrow-down {
    display: none;
}

/* =============================================================================
   PAGE BUILDER COMPATIBILITY - FORCE FULL WIDTH IN ALL CONTEXTS
   ============================================================================= */
.elementor-widget-container .bf-welcome-outer,
.elementor-widget-shortcode .bf-welcome-outer,
.elementor-shortcode .bf-welcome-outer,
.elementor-element .bf-welcome-outer,
.wp-block .bf-welcome-outer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

/* Force Elementor parent containers to be full width */
.elementor-widget-shortcode:has(.bf-welcome-outer),
.elementor-widget-shortcode:has(.bf-welcome-outer) .elementor-widget-container,
.elementor-widget-shortcode:has(.bf-welcome-outer) .elementor-shortcode {
    width: 100% !important;
    max-width: 100% !important;
}

/* =============================================================================
   RESPONSIVE - Mobile
   ============================================================================= */
@media (max-width: 540px) {
    .bf-welcome-outer {
        margin: 16px 0;
    }

    .bf-welcome-wrapper {
        border-radius: 10px;
    }

    .bf-welcome-heading {
        font-size: 15px;
    }

    .bf-welcome-logo-section {
        min-height: 100px;
        padding: 20px;
    }

    .bf-welcome-logo-section img {
        max-width: 140px;
        max-height: 50px;
    }

    .bf-welcome-content {
        padding: 16px 20px;
    }

    .bf-welcome-title {
        font-size: 16px;
    }

    .bf-welcome-subtitle {
        font-size: 13px;
    }

    .bf-welcome-wrapper a.bf-welcome-button,
    a.bf-welcome-button {
        width: 100% !important;
        padding: 12px 24px !important;
    }

    .bf-welcome-terms {
        font-size: 9px;
    }
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    .bf-welcome-wrapper a.bf-welcome-button,
    a.bf-welcome-button {
        transition: none !important;
    }
}
