/**
 * ITSWEBER CMS – Social Embed Section Plugin
 * Stylesheet for social media embed grid with consent placeholders.
 *
 * Class naming convention:
 *   .ses-*          – Section-level elements
 *   .ses-item--*    – Provider-specific modifiers
 *   .ses--cols-*    – Column count modifiers
 *   .section--*     – Core CMS modifier classes (scheme, text color, surface)
 */

/* ── Section Layout ────────────────────────────────────────────────────────── */

.social-embed-section {
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.social-embed-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.ses-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.ses-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.ses-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

/* ── Grid ──────────────────────────────────────────────────────────────────── */

.ses-grid {
    display: grid;
    gap: 1.5rem;
}

.ses--cols-1 .ses-grid { grid-template-columns: 1fr; max-width: 540px; margin: 0 auto; }
.ses--cols-2 .ses-grid { grid-template-columns: repeat(2, 1fr); }
.ses--cols-3 .ses-grid { grid-template-columns: repeat(3, 1fr); }
.ses--cols-4 .ses-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .ses--cols-3 .ses-grid,
    .ses--cols-4 .ses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ses--cols-2 .ses-grid,
    .ses--cols-3 .ses-grid,
    .ses--cols-4 .ses-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Embed Item ────────────────────────────────────────────────────────────── */

.ses-item {
    min-width: 0;
    overflow: hidden;
}

/* ── Embed Wrapper ─────────────────────────────────────────────────────────── */

.ses-embed-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    min-height: 200px;
}

/* TikTok embeds set their own sizing; give them space */
.ses-embed-wrap blockquote.tiktok-embed {
    margin: 0 !important;
    max-width: 100% !important;
}

.ses-embed-wrap iframe {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 12px;
}

/* ── Consent Placeholder ───────────────────────────────────────────────────── */

.ses-consent-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    min-height: 300px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

.ses-consent-icon {
    color: inherit;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.ses-consent-text {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0 0 1.25rem;
}

.ses-consent-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ses-consent-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* Hide placeholder once embed is loaded */
.ses-embed-wrap[data-ses-embed="loaded"] .ses-consent-placeholder {
    display: none;
}

/* ── Fallback Link ─────────────────────────────────────────────────────────── */

.ses-embed-wrap--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
}

.ses-fallback-link {
    font-weight: 600;
    text-decoration: underline;
}

/* ── Item Meta ─────────────────────────────────────────────────────────────── */

.ses-item-meta {
    padding: 0.75rem 0 0;
}

.ses-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.ses-item-description {
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0;
    line-height: 1.4;
}

/* ── CTA ───────────────────────────────────────────────────────────────────── */

.ses-cta {
    text-align: center;
    margin-top: 2.5rem;
}

.ses-cta .btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ses-cta .btn:hover {
    transform: translateY(-2px);
}

/* ── Dark Scheme Adaptations ───────────────────────────────────────────────── */

.section--scheme-dark .ses-embed-wrap {
    background: rgba(255, 255, 255, 0.06);
}

.section--scheme-dark .ses-consent-placeholder {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.section--scheme-dark .ses-embed-wrap--fallback {
    background: rgba(255, 255, 255, 0.06);
}

/* ── Text Color Overrides ──────────────────────────────────────────────────── */

.section--text-white .ses-title,
.section--text-white .ses-label,
.section--text-white .ses-item-title,
.section--text-white .ses-item-description,
.section--text-white .ses-consent-text,
.section--text-white .ses-fallback-link {
    color: #ffffff !important;
}

.section--text-black .ses-title,
.section--text-black .ses-label,
.section--text-black .ses-item-title,
.section--text-black .ses-item-description,
.section--text-black .ses-consent-text,
.section--text-black .ses-fallback-link {
    color: #1a202c !important;
}

.section--text-theme .ses-title,
.section--text-theme .ses-label,
.section--text-theme .ses-item-title,
.section--text-theme .ses-fallback-link {
    color: var(--theme-primary, #15779b) !important;
}
