/* StopDrugPromotion theme helpers on top of Tailwind utilities */

:root {
    /* Light only: no dark palette exists, and declaring it keeps phone browsers
       from repainting the site with their own. */
    color-scheme: only light;
    --brand-600: #dc2626;
    --brand-700: #b91c1c;
    --brand-800: #991b1b;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* The public site scales with the screen: 16px on phones, 18px from tablets up and as far as
   21px on large monitors. Sizes are rem-based, so the whole layout grows with it. Admin and
   live screens stay at 16px. */
html.public {
    font-size: 16px;
}
@media (min-width: 40rem) {
    html.public {
        font-size: clamp(18px, 0.5rem + 0.6vw, 21px);
    }
}

body {
    -webkit-font-smoothing: antialiased;
}

/* Header "Support us" call-to-action */
.support-cta {
    background-image: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 55%, #f43f5e 100%);
    background-size: 160% 160%;
    background-position: 0 50%;
    transition-property: transform, box-shadow, background-position;
}
.support-cta:hover { background-position: 100% 50%; }

.heartbeat {
    animation: heartbeat 1.6s ease-in-out infinite;
    transform-origin: center;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.2); }
    28% { transform: scale(1); }
    42% { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
    .heartbeat { animation: none; }
}

/* Thin scrollbars for horizontal chip rows */
.scroll-thin::-webkit-scrollbar { height: 6px; width: 6px; }
.scroll-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

/* Skeleton shimmer for lazy media */
.shimmer {
    background: linear-gradient(100deg, #eef2ee 40%, #f8faf8 50%, #eef2ee 60%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
    to { background-position: -200% 0; }
}

/* Clip card hover-play */
.clip-card video {
    opacity: 0;
    transition: opacity .25s ease;
}
.clip-card.is-playing video { opacity: 1; }
.clip-card .clip-spinner { display: none; }
.clip-card.is-loading .clip-spinner { display: flex; }

/* Lightbox */
.lightbox-backdrop {
    background: rgba(9, 14, 10, .92);
    backdrop-filter: blur(4px);
}
.lightbox-media img,
.lightbox-media video {
    max-height: 78vh;
    max-width: 92vw;
    border-radius: .75rem;
}

/* Spin animation utility (also used by loading icons) */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Markdown editor (EasyMDE) tuned to the admin form styling */
.EasyMDEContainer .editor-toolbar {
    border-color: #cbd5e1;
    border-radius: .5rem .5rem 0 0;
    background: #f8fafc;
}
.EasyMDEContainer .CodeMirror {
    border-color: #cbd5e1;
    border-radius: 0 0 .5rem .5rem;
    font-family: inherit;
    font-size: .9rem;
    line-height: 1.6;
    color: #1e293b;
}
.EasyMDEContainer .CodeMirror-focused {
    border-color: var(--brand-600);
    box-shadow: 0 0 0 1px var(--brand-600);
}
.EasyMDEContainer .editor-preview,
.EasyMDEContainer .editor-preview-side {
    background: #fff;
    font-size: .9rem;
    line-height: 1.6;
}

/* Simple fade for Alpine transitions */
[x-cloak] { display: none !important; }
