/* ==========================================================================
   STAGE PORTAL BRIDGE
   --------------------------------------------------------------------------
   Integrates the Stage Portal plugin (v2.5.1+) with the Smile Channel theme.

   The plugin uses .sp-* class prefixes and defines its CSS variables at
   :root with a default purple accent (#6a0dad). This bridge overrides
   those variables at the body scope so all Stage Portal components (speaker
   grids, host dashboards, schedule tables, countdowns, bio cards, etc.)
   inherit the theme's cream + gold palette without any markup changes.

   Philosophy: harmonize colors and typography, leave layout alone. The
   plugin already has good responsive CSS for its cards, tables, and grids.

   Shortcodes covered:
     [sp_dashboard]     — host dashboard
     [sp_schedule]      — schedule table
     [sp_speaker_bio]   — single speaker bio card
     [sp_speaker_grid]  — speaker grid
     [sp_countdown]     — countdown timer
     [sp_host_script]   — host script view
     [sp_next_up]       — next-up banner
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLE OVERRIDES
   The plugin defines --sp-* variables at :root. We override them at the
   theme body scope so the new values win specificity without polluting
   the global scope or affecting other plugins that might use similar names.
   ========================================================================== */
body.smile-channel-theme.has-stage-portal {
	--sp-accent:           #B8862A;                      /* theme gold */
	--sp-accent-light:     #F5EAD0;                      /* theme gold-pale */
	--sp-text:             #1A1814;                      /* theme near-black */
	--sp-text-muted:       #6B6558;                      /* theme mute */
	--sp-border:           #E5E0D2;                      /* theme line */
	--sp-surface:          #FFFFFF;                      /* pure white card */
	--sp-radius:           12px;                         /* match theme */
	--sp-shadow:           0 2px 8px rgba(60, 50, 30, 0.06);
	--sp-live-color:       #DC2626;                      /* theme live red */
	--sp-upcoming-color:   #B8862A;                      /* theme gold */
	--sp-completed-color:  #2D7A4F;                      /* theme success */
}

/* ==========================================================================
   2. TYPOGRAPHY HARMONIZATION
   Force the plugin's components to use Inter for body and Playfair for
   display headings, matching the rest of the theme.
   ========================================================================== */
.smile-channel-theme [class^="sp-"],
.smile-channel-theme [class*=" sp-"] {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.smile-channel-theme .sp-bio-name,
.smile-channel-theme .sp-dashboard-title,
.smile-channel-theme .sp-session-title,
.smile-channel-theme .sp-event-title,
.smile-channel-theme .sp-speaker-name,
.smile-channel-theme .sp-countdown-title,
.smile-channel-theme .sp-next-up-title,
.smile-channel-theme .sp-script-title {
	font-family: 'Playfair Display', Georgia, serif !important;
	font-weight: 500 !important;
	letter-spacing: -0.01em !important;
	color: var(--tsc-text-2, #3D3830) !important;
}

/* ==========================================================================
   3. SPEAKER BIO CARDS
   [sp_speaker_bio] / [sp_speaker_grid]
   Restyle to match theme card aesthetic — white surfaces, soft borders,
   gold hover glow, warm shadows.
   ========================================================================== */
.smile-channel-theme .sp-bio-card {
	background: #FFFFFF !important;
	border: 1px solid var(--tsc-line, #E5E0D2) !important;
	border-radius: 12px !important;
	overflow: hidden !important;
	box-shadow: 0 2px 8px rgba(60, 50, 30, 0.06) !important;
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
	            box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.smile-channel-theme .sp-bio-card:hover {
	transform: translateY(-4px) !important;
	box-shadow:
		0 24px 48px -20px rgba(60, 50, 30, 0.22),
		0 0 0 1px rgba(184, 134, 42, 0.35) !important;
}

.smile-channel-theme .sp-bio-photo {
	transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.smile-channel-theme .sp-bio-card:hover .sp-bio-photo {
	transform: scale(1.05) !important;
}

.smile-channel-theme .sp-bio-name {
	font-size: 1.25rem !important;
	margin: 0 0 0.25rem !important;
}

.smile-channel-theme .sp-bio-topic {
	color: var(--tsc-gold, #B8862A) !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
}

.smile-channel-theme .sp-bio-text {
	color: var(--tsc-text-mute, #6B6558) !important;
	font-size: 0.9375rem !important;
	line-height: 1.6 !important;
}

/* ==========================================================================
   4. HOST DASHBOARD
   [sp_dashboard]
   The main backstage view — cards for sessions, event meta, actions.
   ========================================================================== */
.smile-channel-theme .sp-dashboard-card {
	background: #FFFFFF !important;
	border: 1px solid var(--tsc-line, #E5E0D2) !important;
	border-radius: 12px !important;
	box-shadow: 0 2px 8px rgba(60, 50, 30, 0.06) !important;
	transition: all 0.3s ease !important;
}

.smile-channel-theme .sp-dashboard-card:hover {
	border-color: var(--tsc-gold-soft, #D4A24C) !important;
	box-shadow: 0 12px 32px -12px rgba(60, 50, 30, 0.15) !important;
}

.smile-channel-theme .sp-dashboard-title {
	font-size: 1.125rem !important;
	margin: 0 0 0.5rem !important;
}

.smile-channel-theme .sp-dashboard-description {
	color: var(--tsc-text-mute, #6B6558) !important;
	font-size: 0.875rem !important;
	line-height: 1.6 !important;
}

.smile-channel-theme .sp-dashboard-meta,
.smile-channel-theme .sp-meta-item {
	color: var(--tsc-text-mute, #6B6558) !important;
	font-size: 0.8125rem !important;
}

.smile-channel-theme .sp-meta-item strong {
	color: var(--tsc-text, #1A1814) !important;
	font-weight: 600 !important;
}

/* ==========================================================================
   5. ACTION BUTTONS
   Zoom, WhatsApp, and generic action buttons inside dashboard cards.
   Map to the theme's pill button style.
   ========================================================================== */
.smile-channel-theme .sp-action-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: 0.5rem !important;
	padding: 0.65rem 1.25rem !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 0.8125rem !important;
	font-weight: 600 !important;
	border-radius: 999px !important;
	border: 1px solid var(--tsc-line, #E5E0D2) !important;
	background: #FFFFFF !important;
	color: var(--tsc-text, #1A1814) !important;
	text-decoration: none !important;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
	cursor: pointer !important;
}

.smile-channel-theme .sp-action-btn:hover {
	border-color: var(--tsc-gold, #B8862A) !important;
	color: var(--tsc-gold-deep, #8B6420) !important;
	background: var(--tsc-cream-2, #F4F1E8) !important;
	transform: translateY(-2px) !important;
}

/* Zoom button keeps its brand blue accent on hover */
.smile-channel-theme .sp-btn-zoom:hover {
	background: #E6F0FC !important;
	border-color: #2D8CFF !important;
	color: #1E6BCC !important;
}

/* WhatsApp button keeps its brand green accent on hover */
.smile-channel-theme .sp-btn-whatsapp:hover {
	background: #E7F8EE !important;
	border-color: #25D366 !important;
	color: #128C4A !important;
}

.smile-channel-theme .sp-dashboard-actions {
	display: flex !important;
	gap: 0.5rem !important;
	flex-wrap: wrap !important;
}

/* ==========================================================================
   6. SCHEDULE TABLE
   [sp_schedule]
   Table of sessions with time, speaker, status badge.
   ========================================================================== */
.smile-channel-theme .sp-schedule-table,
.smile-channel-theme table.sp-schedule {
	background: #FFFFFF !important;
	border: 1px solid var(--tsc-line, #E5E0D2) !important;
	border-radius: 12px !important;
	overflow: hidden !important;
	box-shadow: 0 2px 8px rgba(60, 50, 30, 0.06) !important;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	width: 100% !important;
}

.smile-channel-theme .sp-schedule-table thead th,
.smile-channel-theme table.sp-schedule thead th {
	background: var(--tsc-cream-2, #F4F1E8) !important;
	color: var(--tsc-text, #1A1814) !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	padding: 0.875rem 1rem !important;
	border-bottom: 1px solid var(--tsc-line, #E5E0D2) !important;
	text-align: left !important;
}

.smile-channel-theme .sp-schedule-table tbody td,
.smile-channel-theme table.sp-schedule tbody td {
	padding: 0.875rem 1rem !important;
	border-bottom: 1px solid var(--tsc-line, #E5E0D2) !important;
	color: var(--tsc-text, #1A1814) !important;
	font-size: 0.9375rem !important;
}

.smile-channel-theme .sp-schedule-table tbody tr:last-child td,
.smile-channel-theme table.sp-schedule tbody tr:last-child td {
	border-bottom: none !important;
}

.smile-channel-theme .sp-schedule-table tbody tr:hover,
.smile-channel-theme table.sp-schedule tbody tr:hover {
	background: var(--tsc-cream, #FAF8F3) !important;
}

/* Status badges — live / upcoming / completed */
.smile-channel-theme .sp-status-badge,
.smile-channel-theme .sp-session-status {
	display: inline-flex !important;
	align-items: center !important;
	gap: 0.35rem !important;
	padding: 0.25rem 0.75rem !important;
	border-radius: 999px !important;
	font-size: 0.65rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
}

.smile-channel-theme .sp-status-live,
.smile-channel-theme .sp-session-live {
	background: rgba(220, 38, 38, 0.1) !important;
	color: #DC2626 !important;
}

.smile-channel-theme .sp-status-live::before,
.smile-channel-theme .sp-session-live::before {
	content: '' !important;
	width: 6px !important;
	height: 6px !important;
	background: #DC2626 !important;
	border-radius: 50% !important;
	display: inline-block !important;
	animation: sp-pulse 1.5s ease-in-out infinite !important;
}

@keyframes sp-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.4; }
}

.smile-channel-theme .sp-status-upcoming,
.smile-channel-theme .sp-session-upcoming {
	background: var(--tsc-gold-pale, #F5EAD0) !important;
	color: var(--tsc-gold-deep, #8B6420) !important;
}

.smile-channel-theme .sp-status-completed,
.smile-channel-theme .sp-session-completed {
	background: #ECFDF5 !important;
	color: #2D7A4F !important;
}

/* ==========================================================================
   7. COUNTDOWN TIMER
   [sp_countdown]
   Days / hours / minutes / seconds blocks.
   ========================================================================== */
.smile-channel-theme .sp-countdown {
	background: linear-gradient(180deg, var(--tsc-cream-2, #F4F1E8) 0%, var(--tsc-gold-pale, #F5EAD0) 100%) !important;
	border: 1px solid var(--tsc-line, #E5E0D2) !important;
	border-radius: 16px !important;
	padding: 2rem !important;
	text-align: center !important;
	box-shadow: 0 12px 32px -12px rgba(60, 50, 30, 0.12) !important;
}

.smile-channel-theme .sp-countdown-title {
	font-size: 1.5rem !important;
	margin: 0 0 1.25rem !important;
}

.smile-channel-theme .sp-countdown-blocks {
	display: flex !important;
	gap: 1rem !important;
	justify-content: center !important;
	flex-wrap: wrap !important;
}

.smile-channel-theme .sp-countdown-block {
	background: #FFFFFF !important;
	border: 1px solid var(--tsc-line, #E5E0D2) !important;
	border-radius: 12px !important;
	padding: 1rem 1.25rem !important;
	min-width: 80px !important;
	box-shadow: 0 2px 8px rgba(60, 50, 30, 0.06) !important;
}

.smile-channel-theme .sp-countdown-number {
	font-family: 'Playfair Display', serif !important;
	font-size: 2.25rem !important;
	font-weight: 500 !important;
	color: var(--tsc-gold, #B8862A) !important;
	line-height: 1 !important;
	display: block !important;
}

.smile-channel-theme .sp-countdown-label {
	font-size: 0.6875rem !important;
	font-weight: 600 !important;
	color: var(--tsc-text-mute, #6B6558) !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	margin-top: 0.25rem !important;
}

/* ==========================================================================
   8. HOST SCRIPT
   [sp_host_script]
   The script/teleprompter view for hosts during live events.
   ========================================================================== */
.smile-channel-theme .sp-host-script {
	background: #FFFFFF !important;
	border: 1px solid var(--tsc-line, #E5E0D2) !important;
	border-radius: 12px !important;
	padding: 1.75rem !important;
	box-shadow: 0 2px 8px rgba(60, 50, 30, 0.06) !important;
}

.smile-channel-theme .sp-script-title {
	font-size: 1.375rem !important;
	margin: 0 0 1rem !important;
	padding-bottom: 0.75rem !important;
	border-bottom: 1px solid var(--tsc-line, #E5E0D2) !important;
}

.smile-channel-theme .sp-script-content,
.smile-channel-theme .sp-script-body {
	color: var(--tsc-text, #1A1814) !important;
	font-size: 1rem !important;
	line-height: 1.7 !important;
	font-family: 'Inter', sans-serif !important;
}

.smile-channel-theme .sp-script-cue {
	background: var(--tsc-gold-pale, #F5EAD0) !important;
	border-left: 3px solid var(--tsc-gold, #B8862A) !important;
	padding: 0.75rem 1rem !important;
	margin: 1rem 0 !important;
	border-radius: 0 8px 8px 0 !important;
	color: var(--tsc-gold-deep, #8B6420) !important;
	font-weight: 500 !important;
	font-size: 0.9375rem !important;
}

/* ==========================================================================
   9. NEXT UP BANNER
   [sp_next_up]
   Small banner showing the next session/speaker in the queue.
   ========================================================================== */
.smile-channel-theme .sp-next-up {
	background: linear-gradient(135deg, var(--tsc-text, #1A1814) 0%, #2A2620 100%) !important;
	color: #FFFFFF !important;
	border-radius: 12px !important;
	padding: 1.25rem 1.5rem !important;
	display: flex !important;
	align-items: center !important;
	gap: 1rem !important;
	box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.3) !important;
}

.smile-channel-theme .sp-next-up-label {
	font-size: 0.6875rem !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.12em !important;
	color: var(--tsc-gold, #B8862A) !important;
}

.smile-channel-theme .sp-next-up-title {
	font-family: 'Playfair Display', serif !important;
	font-size: 1.25rem !important;
	font-weight: 500 !important;
	color: #FFFFFF !important;
	margin: 0.25rem 0 0 !important;
}

.smile-channel-theme .sp-next-up-speaker {
	color: rgba(255, 255, 255, 0.75) !important;
	font-size: 0.875rem !important;
	margin-top: 0.125rem !important;
}

/* ==========================================================================
   10. SPEAKER GRID LAYOUT ADJUSTMENT
   Keep the plugin's responsive columns but tighten the gap slightly
   to match the theme's rhythm.
   ========================================================================== */
.smile-channel-theme .sp-bio-grid {
	gap: 1.5rem !important;
}

/* ==========================================================================
   11. EMPTY STATES
   ========================================================================== */
.smile-channel-theme .sp-no-event,
.smile-channel-theme .sp-no-sessions {
	background: var(--tsc-cream-2, #F4F1E8) !important;
	border: 1px dashed var(--tsc-line, #E5E0D2) !important;
	border-radius: 12px !important;
	padding: 2.5rem 1.5rem !important;
	color: var(--tsc-text-mute, #6B6558) !important;
	font-style: italic !important;
	text-align: center !important;
}

/* ==========================================================================
   12. LINKS INSIDE PLUGIN COMPONENTS
   ========================================================================== */
.smile-channel-theme [class^="sp-"] a:not(.sp-action-btn):not(.sp-btn-zoom):not(.sp-btn-whatsapp),
.smile-channel-theme [class*=" sp-"] a:not(.sp-action-btn):not(.sp-btn-zoom):not(.sp-btn-whatsapp) {
	color: var(--tsc-gold, #B8862A);
	transition: color 0.2s ease;
}

.smile-channel-theme [class^="sp-"] a:not(.sp-action-btn):hover,
.smile-channel-theme [class*=" sp-"] a:not(.sp-action-btn):hover {
	color: var(--tsc-gold-deep, #8B6420);
}

/* ==========================================================================
   13. RESPONSIVE TWEAKS
   ========================================================================== */
@media (max-width: 768px) {
	.smile-channel-theme .sp-countdown {
		padding: 1.5rem 1rem !important;
	}

	.smile-channel-theme .sp-countdown-block {
		min-width: 64px !important;
		padding: 0.75rem 0.875rem !important;
	}

	.smile-channel-theme .sp-countdown-number {
		font-size: 1.75rem !important;
	}

	.smile-channel-theme .sp-schedule-table thead,
	.smile-channel-theme table.sp-schedule thead {
		font-size: 0.7rem !important;
	}
}
