/**
 * SlotsGamblers Provider Header - Frontend Styles
 * Version: 1.2.2
 */

:root {
    --sgph-color-purple: #9333EA;
    --sgph-color-orange: #FF8C42;
    --sgph-color-green: #10B981;
    --sgph-color-red: #EF4444;
    --sgph-color-white: #FFFFFF;
    --sgph-color-gray-light: #F7F7F7;
    --sgph-color-gray-medium: #E0E0E0;
    --sgph-color-gray-dark: #6B7280;
    --sgph-color-black: #1A1A1A;
    --sgph-text-primary: #1A1A1A;
    --sgph-text-secondary: #6B7280;
    --sgph-brand-gradient: linear-gradient(135deg, #9333EA 0%, #FF8C42 100%);
}

/* =============================================== */
/* MAIN WIDGET CONTAINER */
/* =============================================== */
.sgph-provider-header {
    font-family: 'Inter', sans-serif;
    background: var(--sgph-color-white);
    border: 1px solid var(--sgph-color-gray-medium);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure full width utilization on large screens */
@media (min-width: 1920px) {
    .sgph-provider-header {
        max-width: 100%;
    }
}

/* =============================================== */
/* PROVIDER LOGO BOX */
/* =============================================== */
.sgph-provider-logo-box {
    width: 12rem;
    height: 12rem;
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.sgph-provider-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sgph-provider-logo-text {
    font-size: 4rem;
    font-weight: 900;
    color: var(--sgph-color-white);
    line-height: 1;
}

/* =============================================== */
/* PROVIDER CONTENT */
/* =============================================== */
.sgph-provider-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

/* Badge positioned to the right on desktop */
@media (min-width: 769px) {
    .sgph-provider-content {
        position: relative;
    }
    
    .sgph-badge {
        position: absolute;
        top: 0;
        right: 0;
    }
    
    .sgph-provider-title {
        padding-right: 10rem;
    }
}

/* =============================================== */
/* BADGE */
/* =============================================== */
.sgph-badge {
    display: inline-block;
    width: fit-content;
    background: rgba(147, 51, 234, 0.1);
    color: var(--sgph-color-purple);
    padding: 0.375rem 0.875rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--sgph-color-purple);
    line-height: 1.4;
}

/* =============================================== */
/* PROVIDER TITLE */
/* =============================================== */
.sgph-provider-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 900;
    background: var(--sgph-brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin: 0;
}

/* =============================================== */
/* PROVIDER META */
/* =============================================== */
.sgph-provider-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--sgph-text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    flex-wrap: wrap;
}

.sgph-provider-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* =============================================== */
/* PROVIDER DESCRIPTION */
/* =============================================== */
.sgph-provider-description {
    color: var(--sgph-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Read More functionality */
.sgph-provider-description.sgph-has-read-more {
    position: relative;
    overflow: hidden;
}

.sgph-description-content {
    display: block;
}

.sgph-visible-text {
    display: inline;
}

.sgph-ellipsis {
    display: inline;
}

.sgph-hidden-text {
    display: none;
}

.sgph-provider-description[data-expanded="true"] .sgph-ellipsis {
    display: none;
}

.sgph-provider-description[data-expanded="true"] .sgph-hidden-text {
    display: inline;
}

/* Read More Toggle Button - SlotGamblers Style */
.sgph-read-more-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-top: 1.25rem !important;
    padding: 1rem 1.75rem !important;
    background: #FFFFFF !important;
    border: 2px solid #9333EA !important;
    border-radius: 0.5rem !important;
    color: #9333EA !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: 'Inter', sans-serif !important;
    text-transform: none !important;
    letter-spacing: 0.025em !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.sgph-read-more-toggle:hover {
    background: #9333EA !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(147, 51, 234, 0.35) !important;
    border-color: #9333EA !important;
}

.sgph-read-more-toggle:focus {
    outline: 3px solid rgba(147, 51, 234, 0.3) !important;
    outline-offset: 2px !important;
}

.sgph-read-more-toggle:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(147, 51, 234, 0.2) !important;
}

.sgph-read-more-toggle::after {
    content: '↓' !important;
    display: inline-block !important;
    font-size: 1.25rem !important;
    font-weight: 900 !important;
    transition: transform 0.3s ease !important;
    margin-left: 0.25rem !important;
}

.sgph-provider-description[data-expanded="true"] ~ .sgph-read-more-toggle {
    border-color: #FF8C42 !important;
    color: #FF8C42 !important;
}

.sgph-provider-description[data-expanded="true"] ~ .sgph-read-more-toggle:hover {
    background: #FF8C42 !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 16px rgba(255, 140, 66, 0.35) !important;
}

.sgph-provider-description[data-expanded="true"] ~ .sgph-read-more-toggle::after {
    content: '↑' !important;
}

.sgph-read-less-text {
    display: none !important;
}

.sgph-provider-description[data-expanded="true"] ~ .sgph-read-more-toggle .sgph-read-more-text {
    display: none !important;
}

.sgph-provider-description[data-expanded="true"] ~ .sgph-read-more-toggle .sgph-read-less-text {
    display: inline !important;
}

/* =============================================== */
/* PROVIDER STATS */
/* =============================================== */
.sgph-provider-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    grid-column: span 2;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sgph-color-gray-medium);
}

.sgph-stat-box {
    text-align: center;
    padding: 1rem;
    background: var(--sgph-color-gray-light);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.sgph-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sgph-stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--sgph-color-purple);
    margin-bottom: 0.25rem;
    line-height: 1.2;
    transition: transform 0.3s ease;
    display: inline-block;
}

.sgph-stat-value.sgph-animated {
    animation: sgph-pulse 0.5s ease-in-out;
}

.sgph-stat-value.sgph-slot-stop {
    animation: sgph-slot-ding 0.5s ease-out;
}

@keyframes sgph-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes sgph-slot-ding {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.2);
        color: var(--sgph-color-orange);
    }
    60% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        color: var(--sgph-color-purple);
    }
}

.sgph-stat-label {
    font-size: 0.75rem;
    color: var(--sgph-text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.4;
}

/* =============================================== */
/* CTA BUTTON */
/* =============================================== */
.sgph-cta-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: -3rem;
    padding-bottom: 1rem;
}

.sgph-cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--sgph-color-green);
    color: var(--sgph-color-white);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.9375rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-align: center;
    width: fit-content;
    line-height: 1.4;
}

.sgph-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
    text-decoration: none;
    color: var(--sgph-color-white);
}

/* =============================================== */
/* ELEMENTOR EDITOR COMPATIBILITY */
/* =============================================== */
.elementor-editor-active .sgph-provider-header {
    display: grid !important;
    visibility: visible !important;
    min-height: 200px !important;
}

/* =============================================== */
/* RESPONSIVE DESIGN - TABLET (768px - 1199px) */
/* =============================================== */
@media (max-width: 1199px) and (min-width: 768px) {
    .sgph-provider-header {
        padding: 1.75rem;
        gap: 1.75rem;
    }
    
    .sgph-provider-logo-box {
        width: 11rem;
        height: 11rem;
    }
    
    .sgph-provider-logo-text {
        font-size: 3.5rem;
    }
    
    .sgph-provider-title {
        font-size: clamp(1.5rem, 2.5vw, 2rem);
    }
    
    .sgph-provider-description {
        font-size: 0.9375rem;
    }
    
    .sgph-provider-stats {
        gap: 0.875rem;
    }
    
    .sgph-stat-value {
        font-size: 1.375rem;
    }
}

/* =============================================== */
/* RESPONSIVE DESIGN - MOBILE (max-width: 768px) */
/* =============================================== */
@media (max-width: 768px) {
    /* Full-width mobile layout with calc(-50vw + 50%) technique */
    .sgph-provider-header {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 1.5rem 1rem 1.75rem;
        text-align: left;
    }
    
    /* Mobile header section - logo + badge + title in one compact block */
    .sgph-provider-header > .sgph-provider-logo-box {
        width: 5rem;
        height: 5rem;
        margin: 0 auto 1rem;
        box-shadow: 0 6px 20px rgba(147, 51, 234, 0.25);
        border: 2px solid rgba(147, 51, 234, 0.2);
        border-radius: 1rem;
    }
    
    .sgph-provider-logo-text {
        font-size: 2.25rem;
    }
    
    .sgph-provider-content {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        position: relative;
        text-align: center;
    }
    
    /* Badge - centered and prominent */
    .sgph-badge {
        position: static !important;
        align-self: center;
        margin: 0 0 0.5rem 0;
        font-size: 0.6875rem;
        padding: 0.375rem 1rem;
        display: inline-block;
        width: fit-content;
    }
    
    .sgph-provider-title {
        font-size: 1.75rem !important;
        padding: 0;
        text-align: center;
        width: 100%;
        line-height: 1.25;
        margin: 0 0 0.625rem 0;
    }
    
    .sgph-provider-meta {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.875rem;
        font-size: 0.8125rem;
        margin: 0 0 0.875rem 0;
        padding: 0;
    }
    
    .sgph-provider-meta span {
        white-space: nowrap;
    }
    
    .sgph-provider-description {
        font-size: 0.9375rem;
        line-height: 1.65;
        text-align: left;
        padding: 0 0.25rem;
        margin: 0;
    }
    
    /* Read More button mobile styling - enhanced touch target */
    .sgph-read-more-toggle {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9375rem !important;
        margin-top: 1rem !important;
        min-height: 48px !important;
        border-radius: 0.625rem !important;
    }
    
    .sgph-read-more-toggle::after {
        font-size: 1.125rem !important;
    }
    
    .sgph-provider-stats {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
        margin-top: 1.25rem;
        padding-top: 1.25rem;
        border-top: 2px solid var(--sgph-color-gray-medium);
    }
    
    .sgph-stat-box {
        padding: 0.875rem 0.5rem;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        border: 1px solid var(--sgph-color-gray-medium);
        border-radius: 0.75rem;
        text-align: center;
        background: linear-gradient(135deg, #FAFAFA 0%, #F7F7F7 100%);
    }
    
    .sgph-stat-value {
        font-size: 1.375rem;
        margin-bottom: 0.25rem;
    }
    
    .sgph-stat-label {
        font-size: 0.6875rem;
        text-align: center;
    }
    
    .sgph-cta-wrapper {
        width: 100%;
        margin-top: 1.25rem;
        padding: 0;
        display: flex;
        justify-content: center;
    }
    
    .sgph-cta-button {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        padding: 1rem 2rem !important;
        font-size: 0.9375rem !important;
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
        min-height: 50px;
        border-radius: 0.625rem;
        font-weight: 800;
        letter-spacing: 0.025em;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* =============================================== */
/* RESPONSIVE DESIGN - SMALL MOBILE (max-width: 480px) */
/* =============================================== */
@media (max-width: 480px) {
    .sgph-provider-header {
        padding: 1.25rem 0.875rem 1.5rem;
    }
    
    .sgph-provider-logo-box {
        width: 4.5rem;
        height: 4.5rem;
        margin: 0 auto 0.875rem;
        border-width: 2px;
    }
    
    .sgph-provider-logo-text {
        font-size: 2rem;
    }
    
    .sgph-badge {
        font-size: 0.625rem;
        padding: 0.3125rem 0.875rem;
    }
    
    .sgph-provider-title {
        font-size: 1.5rem !important;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .sgph-provider-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }
    
    .sgph-provider-meta span {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .sgph-provider-description {
        font-size: 0.875rem;
        padding: 0 0.125rem;
        line-height: 1.6;
    }
    
    .sgph-read-more-toggle {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.875rem !important;
    }
    
    .sgph-provider-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding-top: 1rem;
        margin-top: 1rem;
    }
    
    .sgph-stat-box {
        padding: 0.75rem 0.375rem;
    }
    
    .sgph-stat-value {
        font-size: 1.25rem;
    }
    
    .sgph-stat-label {
        font-size: 0.625rem;
    }
    
    .sgph-cta-button {
        width: 100% !important;
        min-width: auto !important;
        padding: 0.875rem 1.75rem !important;
        font-size: 0.875rem !important;
        min-height: 48px;
    }
}

/* =============================================== */
/* PREVENT GLOBAL CSS CONFLICTS */
/* =============================================== */
.sgph-provider-header,
.sgph-provider-header * {
    box-sizing: border-box;
}

.sgph-provider-header a {
    text-decoration: none;
}

.sgph-provider-header h1,
.sgph-provider-header h2,
.sgph-provider-header h3,
.sgph-provider-header h4,
.sgph-provider-header h5,
.sgph-provider-header h6,
.sgph-provider-header p {
    margin: 0;
    padding: 0;
}

