/**
 * Shareable Artist Profile — dark-theme styles
 * Aligned with Artist Growth Figma design system.
 * Uses Bootstrap 5 grid/utilities; custom properties for the AG color system.
 */

/* ── AG Design Tokens ──────────────────────────────────────────────── */
:root {
    --sp-bg: #0E1012;
    --sp-card-bg: #161A1D;
    --sp-surface: #1E2326;
    --sp-border: #2C3236;
    --sp-accent: #00C4BC;
    --sp-accent-dark: #00936A;
    --sp-text-primary: #F0EFEC;
    --sp-text-secondary: #98A5AE;
    --sp-text-muted: #546478;
    --sp-green: #6AAF3D;
    --sp-moss: #4A7C2F;
    --sp-pink: #C3368E;
}

/* ── Base ───────────────────────────────────────────────────────────── */
body.sp-page {
    background-color: var(--sp-bg);
    color: var(--sp-text-primary);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sp-page a {
    color: var(--sp-accent);
    text-decoration: none;
}

.sp-page a:hover {
    color: var(--sp-accent-dark);
    text-decoration: none;
}

/* ── Artist image background — applied when organization.image is set ── */
.sp-has-bg-image {
    background: var(--sp-bg) var(--sp-bg-image) center / cover no-repeat fixed;
}

.sp-has-bg-image::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(14, 16, 18, 0.55) 0%, rgba(14, 16, 18, 0.92) 100%);
    pointer-events: none;
    z-index: 0;
}

.sp-has-bg-image > .container {
    position: relative;
    z-index: 1;
}

/* ── Card — mirrors Figma rounded-2xl cards ────────────────────────── */
.sp-card {
    background-color: var(--sp-card-bg);
    border: 1px solid var(--sp-border);
    border-radius: 1rem;
    padding: 2rem;
}

.sp-has-bg-image .sp-card,
.sp-has-bg-image .sp-tab-bar {
    background-color: rgba(22, 26, 29, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ── Centered state cards (revoked / password) ──────────────────────── */
.sp-state-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.sp-state-card {
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.sp-state-card h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sp-state-card p {
    color: var(--sp-text-secondary);
    margin-bottom: 1.5rem;
}

.sp-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* ── Password form ──────────────────────────────────────────────────── */
.sp-password-input {
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 0.5rem;
    color: var(--sp-text-primary);
    padding: 0.625rem 0.875rem;
    width: 100%;
    font-size: 0.9375rem;
}

.sp-password-input:focus {
    outline: none;
    border-color: var(--sp-accent);
    box-shadow: 0 0 0 2px rgba(0, 196, 188, 0.15);
}

.sp-password-input::placeholder {
    color: var(--sp-text-muted);
}

.sp-btn-primary {
    background-color: var(--sp-accent);
    border: none;
    border-radius: 0.5rem;
    color: #0E1012;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.625rem 1.5rem;
    transition: background-color 0.15s ease;
    width: 100%;
}

.sp-btn-primary:hover {
    background-color: var(--sp-accent-dark);
    color: #fff;
}

.sp-error-text {
    color: #ef4444;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

/* ── Profile header — horizontal card layout ────────────────────────── */
.sp-header {
    padding: 2rem 0 1.5rem;
}

.sp-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.sp-avatar-col {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.sp-avatar {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--sp-border);
}

.sp-header-info {
    flex: 1;
    min-width: 0;
}

.sp-header-info h1 {
    font-size: 2.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.sp-location {
    display: block;
    color: var(--sp-text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.sp-location svg {
    display: inline-block;
    vertical-align: -1px;
    color: var(--sp-text-muted);
}

.sp-location .sp-location-label {
    color: var(--sp-text-muted);
}

/* ── Genre badges ───────────────────────────────────────────────────── */
.sp-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.sp-genre-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 9999px;
    color: var(--sp-text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    transition: background-color 0.15s ease;
}

.sp-genre-badge:hover {
    background-color: var(--sp-border);
}

/* ── Tab navigation — full-width bar ────────────────────────────────── */
.sp-tabs {
    position: relative;
    z-index: 2;
}

.sp-tab-bar {
    background-color: var(--sp-card-bg);
    border-bottom: 1px solid var(--sp-border);
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.sp-tabs .nav-tabs {
    border-bottom: none;
    gap: 2rem;
}

.sp-tabs .nav-tabs .nav-link {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--sp-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 1rem 0;
    transition: color 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.sp-tabs .nav-tabs .nav-link:hover {
    color: var(--sp-text-primary);
}

.sp-tabs .nav-tabs .nav-link.active {
    color: var(--sp-text-primary);
    border-bottom-color: var(--sp-accent);
    background: transparent;
}

.sp-tabs .tab-content {
    padding-top: 2rem;
}

/* ── Section headings — 2xl per Figma ───────────────────────────────── */
.sp-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--sp-text-primary);
}

.sp-section-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.sp-section-title-row .sp-section-title {
    margin-bottom: 0;
}

.sp-period-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--sp-text-muted);
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-border);
}

/* ── Bio card ──────────────────────────────────────────────────────── */
.sp-bio {
    color: var(--sp-text-secondary);
    font-size: 1rem;
    line-height: 1.65;
}

.sp-bio-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-bio-toggle {
    background: none;
    border: none;
    color: var(--sp-accent);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0;
    margin-top: 0.75rem;
}

.sp-bio-toggle:hover {
    color: var(--sp-accent-dark);
}

/* ── Social / Connect — fixed-width tiles that wrap ─────────────────── */
.sp-social-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
}

.sp-social-link {
    flex: 0 0 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 1rem 0.5rem;
    border-radius: 0.75rem;
    color: var(--sp-text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    transition: background-color 0.15s ease;
}

.sp-social-link:hover {
    background-color: var(--sp-surface);
    color: var(--sp-text-primary);
    text-decoration: none;
}

.sp-social-link svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.sp-social-link:hover svg {
    transform: scale(1.1);
}

.sp-social-link span {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    color: var(--sp-text-secondary);
}

/* ── Stats cards — left colored border bar ──────────────────────────── */
.sp-stat-card {
    height: 100%;
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.sp-stat-header {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.sp-stat-header .sp-stat-badge {
    margin-left: auto;
}

.sp-stat-label-block {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.sp-stat-label-block .sp-stat-metric {
    margin-top: 0;
}

.sp-stat-card:has(.sp-stat-label-block) .sp-stat-value {
    margin-top: 0.75rem;
}

.sp-stat-platform-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sp-stat-platform {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sp-text-primary);
}

.sp-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--sp-text-primary);
    line-height: 1.2;
}

.sp-stat-metric {
    font-size: 0.6875rem;
    color: var(--sp-text-muted);
    margin-top: 0.125rem;
}

.sp-stat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    color: #fff;
    min-width: 3rem;
    min-height: 1.5rem;
}

.sp-stat-badge.up {
    background-color: rgb(0, 50, 37);
    border-color: rgba(176, 255, 219, 0.36);
    color: #4ade80;
}

.sp-stat-badge.down {
    background-color: rgb(96, 20, 16);
    border-color: rgba(236, 146, 142, 0.36);
    color: #f87171;
}

.sp-stat-badge.neutral {
    background-color: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--sp-text-secondary);
}

/* ── Shopify Store Sales — large summary cards + carousel ──────────── */
.sp-stat-card--summary {
    --card-accent: var(--sp-accent);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 1rem 1.25rem;
    min-height: 96px;
    border-color: color-mix(in srgb, var(--card-accent) 28%, var(--sp-border));
}

.sp-stat-card--summary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 18%, transparent) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.sp-stat-card--summary > * {
    position: relative;
    z-index: 1;
}

.sp-stat-card--summary .sp-stat-metric {
    color: var(--card-accent);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0;
}

.sp-stat-card--summary.sp-stat-card--green {
    --card-accent: var(--sp-green);
}

.sp-stat-card--summary.sp-stat-card--moss {
    --card-accent: var(--sp-accent-dark);
}

.sp-stat-value--large {
    font-size: 2rem;
    line-height: 1.1;
    margin-top: 0.25rem;
}

.sp-shopify-carousel {
    position: relative;
}

.sp-shopify-store-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sp-text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.sp-shopify-store-label a {
    color: var(--sp-text-primary);
    text-decoration: none;
    transition: color 120ms ease;
}

.sp-shopify-store-label a:hover,
.sp-shopify-store-label a:focus-visible {
    color: var(--sp-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    outline: none;
}

.sp-carousel-indicators {
    position: static;
    margin: 0;
    justify-content: center;
}

.sp-carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--sp-text-muted);
    border: none;
    opacity: 0.5;
}

.sp-carousel-indicators [data-bs-target].active {
    background-color: var(--sp-accent);
    opacity: 1;
}

/* ── Events — flat list matching client UI ─────────────────────────── */

.sp-events-list {
    display: flex;
    flex-direction: column;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--sp-text-muted) transparent;
}

.sp-events-list::-webkit-scrollbar {
    width: 6px;
}

.sp-events-list::-webkit-scrollbar-track {
    background: transparent;
}

.sp-events-list::-webkit-scrollbar-thumb {
    background-color: var(--sp-text-muted);
    border-radius: 3px;
}

.sp-events-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--sp-text-secondary);
}

.sp-event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--sp-border);
}

.sp-event-item:last-child {
    border-bottom: none;
}

.sp-event-details {
    flex: 1;
    min-width: 0;
}

.sp-event-details h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--sp-text-primary);
}

.sp-event-datetime {
    font-size: 0.8125rem;
    color: var(--sp-text-secondary);
}

.sp-event-tz {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--sp-text-muted);
    background-color: var(--sp-surface);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    margin-left: 0.375rem;
    vertical-align: middle;
    letter-spacing: 0.025em;
}

.sp-event-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.sp-event-type-icon img {
    width: 16px;
    height: 16px;
}

.sp-event-type-icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--sp-text-primary);
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-border);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    pointer-events: none;
}

/* ── Partner items ──────────────────────────────────────────────────── */
.sp-partners-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sp-partner-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.sp-partner-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    background-color: var(--sp-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-partner-icon svg {
    width: 20px;
    height: 20px;
    color: var(--sp-text-secondary);
}

.sp-partner-type {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sp-text-muted);
    margin-bottom: 0.125rem;
}

.sp-partner-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sp-text-primary);
}

/* ── Contact overview cards (Team view) ────────────────────────────── */
.sp-contacts-overview {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sp-contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background-color: var(--sp-surface);
    transition: background-color 0.15s ease;
}

.sp-contact-card:hover {
    background-color: var(--sp-border);
}

.sp-contact-info {
    flex: 1;
    min-width: 0;
}

.sp-contact-role {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sp-text-muted);
    margin-bottom: 0.125rem;
}

.sp-contact-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sp-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-contact-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.sp-contact-action-btn {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-text-secondary);
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.sp-page a.sp-contact-action-btn {
    color: var(--sp-text-secondary);
}

.sp-contact-action-btn:hover,
.sp-contact-action-btn[aria-expanded="true"] {
    background-color: var(--sp-border);
    color: var(--sp-text-secondary);
}

.sp-contact-action-btn svg {
    width: 16px;
    height: 16px;
}

/* ── Contact dropdown — shown when contact has multiple phones or emails ── */
.sp-contact-menu {
    background-color: var(--sp-card-bg);
    border: 1px solid var(--sp-border);
    border-radius: 0.75rem;
    padding: 0.375rem;
    min-width: 220px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.sp-contact-menu-item {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.sp-page a.sp-contact-menu-item:hover {
    background-color: var(--sp-surface);
    text-decoration: none;
}

.sp-contact-menu-label {
    display: block;
    font-size: 0.75rem;
    color: var(--sp-text-muted);
    margin-bottom: 0.125rem;
}

.sp-contact-menu-value {
    display: block;
    font-size: 0.9375rem;
    color: var(--sp-accent);
    font-weight: 500;
}

/* ── Assets — two column layout, items with border ──────────────────── */
.sp-asset-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sp-asset-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--sp-border);
    transition: border-color 0.15s ease, background-color 0.15s ease;
    color: var(--sp-text-primary);
}

.sp-asset-item:hover {
    border-color: var(--sp-accent);
    background-color: var(--sp-surface);
    color: var(--sp-text-primary);
    text-decoration: none;
}

.sp-asset-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    background-color: rgba(0, 196, 188, 0.1);
    border: 1px solid rgba(0, 196, 188, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-asset-icon img {
    width: 24px;
    height: 24px;
}

.sp-asset-icon.green {
    background-color: rgba(106, 175, 61, 0.1);
    border-color: rgba(106, 175, 61, 0.3);
}

.sp-asset-icon.green svg {
    color: var(--sp-green);
}

.sp-asset-icon.teal-dark {
    background-color: rgba(0, 147, 106, 0.1);
    border-color: rgba(0, 147, 106, 0.3);
}

.sp-asset-icon.teal-dark svg {
    color: var(--sp-accent-dark);
}

.sp-asset-icon.moss {
    background-color: rgba(74, 124, 47, 0.1);
    border-color: rgba(74, 124, 47, 0.3);
}

.sp-asset-icon.moss svg {
    color: var(--sp-moss);
}

.sp-asset-info {
    flex: 1;
    min-width: 0;
}

.sp-asset-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sp-text-primary);
    transition: color 0.15s ease;
}

.sp-asset-item:hover .sp-asset-name {
    color: var(--sp-accent);
}

.sp-asset-ext-icon {
    flex-shrink: 0;
    color: var(--sp-text-muted);
    transition: color 0.15s ease;
}

.sp-asset-item:hover .sp-asset-ext-icon {
    color: var(--sp-accent);
}

.sp-asset-ext-icon svg {
    width: 16px;
    height: 16px;
}

/* ── Responsive — rules that have no Bootstrap utility equivalent ───── */
@media (max-width: 767.98px) {
    .sp-header-info h1 {
        font-size: 1.75rem;
    }

    .sp-avatar {
        width: 96px;
        height: 96px;
    }

    .sp-tab-bar {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .sp-tabs .nav-tabs {
        gap: 1.25rem;
    }

    .sp-tabs .nav-tabs .nav-link {
        font-size: 0.8125rem;
        padding: 0.75rem 0;
    }

    .sp-social-container {
        justify-content: space-evenly;
    }

    .sp-card {
        padding: 1.5rem;
    }
}

/* ── Powered-by badge ─────────────────────────────────────────────── */
.sp-powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    margin-top: 2rem;
    font-size: 0.85rem;
    opacity: 0.75;
}

.sp-powered-by a,
.sp-powered-by a:hover {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--sp-text-muted);
    text-decoration: none;
}

.sp-powered-by img {
    opacity: 0.55;
    filter: invert(1) brightness(1.0);
}

/* ── Media tab ───────────────────────────────────────────────── */
.sp-media-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sp-media-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.sp-media-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sp-media-item iframe {
    display: block;
    border: 0;
    border-radius: 0.5rem;
    width: 100%;
}

.sp-media-video-wrap {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}

.sp-media-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
}

.sp-media-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sp-text-primary);
    line-height: 1.35;
    word-break: break-word;
}

.sp-image-carousel {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Fixed responsive height (clamp(min, fluid, max)) keeps every slide the same
 * size regardless of source aspect ratio, so the carousel never jitters as
 * users navigate between portrait, landscape, and square photos. `object-fit:
 * contain` shows the full image. */
.sp-image-carousel-img {
    display: block;
    width: 100%;
    height: clamp(260px, 50vw, 480px);
    object-fit: contain;
}

.sp-image-carousel .carousel-item .sp-media-title {
    margin-top: 0.5rem;
}

/* Shared nav strip for carousels: prev | indicators | next, sat above
 * the carousel content. The dot indicators inherit their static
 * positioning + dot styling from the global `.sp-carousel-indicators`
 * rule; only the nav wrapper and small circular buttons live here. */
.sp-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.sp-carousel-nav-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 1px solid var(--sp-border);
    background-color: var(--sp-surface);
    color: var(--sp-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition:
        color 120ms ease,
        background-color 120ms ease;
}

.sp-carousel-nav-btn:hover,
.sp-carousel-nav-btn:focus-visible {
    color: var(--sp-text-primary);
    background-color: var(--sp-card-bg);
    outline: none;
}
