/* ChurchHost plugin pieces. Colors come from the theme (theme.json presets), with plain fallbacks. */
:root {
  --chp-primary: var(--wp--preset--color--primary, #1E3A5F);
  --chp-ink: var(--wp--preset--color--contrast, #1B2A41);
  --chp-base: var(--wp--preset--color--base, #fff);
  --chp-surface: var(--wp--preset--color--surface, #FBF8F2);
  --chp-tint: var(--wp--preset--color--tint, #F3EDE1);
  --chp-line: var(--wp--preset--color--line, #E6DECF);
  --chp-muted: var(--wp--preset--color--muted, #5A6476);
  --chp-accent: var(--wp--preset--color--accent, #C9973A);
  --chp-accent-soft: var(--wp--preset--color--accent-soft, #F5E9CF);
  --chp-accent-ink: var(--wp--preset--color--accent-ink, #8A6420);
  --chp-radius: 20px;
  --chp-shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 12px 32px -12px rgba(17, 24, 39, .14);
  --chp-shadow-lift: 0 2px 4px rgba(17, 24, 39, .06), 0 24px 48px -16px rgba(17, 24, 39, .22);
  --chp-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Buttons */
.ch-button { display: inline-flex; align-items: center; gap: .5em; padding: .75em 1.35em; border-radius: 999px; background: var(--chp-primary); color: var(--chp-base) !important; font-weight: 600; text-decoration: none !important; line-height: 1.2; border: 1.5px solid transparent;
  transition: background .2s var(--chp-ease), transform .2s var(--chp-ease), box-shadow .2s var(--chp-ease); }
.ch-button:hover { background: var(--chp-ink); transform: translateY(-1px); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--chp-primary) 70%, transparent); }
.ch-button-light { background: transparent; color: var(--chp-primary) !important; border-color: color-mix(in srgb, var(--chp-primary) 45%, transparent); }
.ch-button-light:hover { background: var(--chp-tint); box-shadow: none; }
.ch-small { font-size: .9em; }
.ch-muted { color: var(--chp-muted); }
.ch-label { font-weight: 700; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--chp-accent-ink); margin: 0 0 .6em; }

/* Service times: one card each */
.ch-times { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.ch-times li { background: var(--chp-base); border: 1px solid var(--chp-line); border-radius: 16px; padding: .9rem 1.1rem; display: grid; gap: .1rem; box-shadow: var(--chp-shadow); }
.ch-day { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--chp-muted); }
.ch-time { font-size: 1.5rem; font-weight: 700; color: var(--chp-ink); letter-spacing: -.01em; line-height: 1.2; }
.ch-name { color: var(--chp-muted); font-size: .95rem; }
/* ...but a plain list in the footer */
.ch-footer .ch-times { display: block; margin: 0; }
.ch-footer .ch-times li { display: block; background: none; border: 0; box-shadow: none; padding: .3em 0; border-radius: 0; }
.ch-footer .ch-day, .ch-footer .ch-time { font-size: .95rem; letter-spacing: 0; text-transform: none; color: var(--chp-ink); }
.ch-footer .ch-time { font-weight: 600; }
.ch-footer .ch-name::before { content: "· "; }
.ch-address { margin-bottom: .3em; font-size: 1.05rem; }

/* Sermons */
.ch-sermon-meta { color: var(--chp-muted); font-size: .95rem; margin: 0 0 1.2em; display: flex; flex-wrap: wrap; gap: .2em .1em; align-items: center; }
.ch-sermon-meta a { color: inherit; text-decoration: none; font-weight: 500; }
.ch-sermon-meta a:hover { color: var(--chp-primary); text-decoration: underline; }
.ch-dot { opacity: .5; }
.ch-passage { display: inline-block; font-weight: 600; color: var(--chp-accent-ink); background: var(--chp-accent-soft); border-radius: 999px; padding: .1em .7em; }
.ch-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.5em; border-radius: var(--chp-radius); overflow: hidden; background: #000; box-shadow: var(--chp-shadow-lift); }
.ch-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ch-audio { background: var(--chp-base); border: 1px solid var(--chp-line); border-radius: var(--chp-radius); padding: 1.1em 1.3em 1em; margin: 0 0 1.8em; box-shadow: var(--chp-shadow); }
.ch-audio .ch-small { margin: .7em 0 0; }
.ch-audio .ch-small a { color: var(--chp-muted); }
.ch-sermons.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4em; }
.ch-sermon { background: var(--chp-base); border: 1px solid var(--chp-line); border-radius: var(--chp-radius); overflow: hidden; box-shadow: var(--chp-shadow); transition: transform .35s var(--chp-ease), box-shadow .35s var(--chp-ease); }
.ch-sermon:hover { transform: translateY(-3px); box-shadow: var(--chp-shadow-lift); }
.ch-sermon .ch-thumb { display: block; position: relative; overflow: hidden; }
.ch-sermon .ch-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s var(--chp-ease); }
.ch-sermon:hover .ch-thumb img { transform: scale(1.04); }
.ch-sermon .ch-thumb::after { content: ""; position: absolute; left: 1rem; bottom: 1rem; width: 3rem; height: 3rem; border-radius: 50%;
  background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z' fill='%231B2A41'/%3E%3C/svg%3E") 55% 50% / 1.3rem no-repeat;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.ch-sermon .ch-body { padding: 1.1em 1.3em .5em; }
.ch-sermon h3 { font-size: 1.2em; margin: 0 0 .4em; letter-spacing: -.01em; }
.ch-sermon h3 a { text-decoration: none; color: inherit; }
.ch-sermon h3 a:hover { color: var(--chp-primary); }
.ch-sermon .ch-sermon-meta { font-size: .88em; margin-bottom: .9em; }
.ch-feature .ch-sermon { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
.ch-feature .ch-sermon .ch-thumb img { aspect-ratio: 16 / 10; }
.ch-feature .ch-sermon .ch-thumb::after { width: 4rem; height: 4rem; background-size: 1.7rem; left: 1.4rem; bottom: 1.4rem; }
.ch-feature .ch-sermon .ch-body { padding: 1.8em 2em; }
.ch-feature .ch-sermon h3 { font-size: clamp(1.5em, 2.6vw, 2.1em); }
@media (max-width: 760px) { .ch-feature .ch-sermon { grid-template-columns: 1fr; } }

/* The audio player (WordPress's own), made to match the site instead of the default black bar */
.ch-audio .mejs-container, .ch-sermon .mejs-container, .ch-audio .mejs-container .mejs-controls, .ch-sermon .mejs-container .mejs-controls { background: var(--chp-tint) !important; border-radius: 999px; }
.ch-audio .mejs-container, .ch-sermon .mejs-container { height: 48px !important; }
.ch-audio .mejs-controls, .ch-sermon .mejs-controls { height: 48px !important; padding: 0 12px !important; }
.mejs-container .mejs-button > button { filter: invert(1) brightness(.35); }
.mejs-container .mejs-time { color: var(--chp-ink) !important; font-weight: 600; }
.mejs-container .mejs-time-rail .mejs-time-total { background: color-mix(in srgb, var(--chp-ink) 15%, transparent) !important; border-radius: 999px; }
.mejs-container .mejs-time-loaded { background: color-mix(in srgb, var(--chp-ink) 12%, transparent) !important; border-radius: 999px; }
.mejs-container .mejs-time-current { background: var(--chp-primary) !important; border-radius: 999px; }
.mejs-container .mejs-horizontal-volume-total { background: color-mix(in srgb, var(--chp-ink) 18%, transparent) !important; }
.mejs-container .mejs-horizontal-volume-current { background: var(--chp-primary) !important; }

/* Events */
.ch-events { list-style: none; padding: 0; margin: 0; display: grid; gap: .8em; }
.ch-event { display: flex; gap: 1.1em; align-items: center; background: var(--chp-base); border: 1px solid var(--chp-line); border-radius: 18px; padding: .85em 1.1em; box-shadow: var(--chp-shadow);
  transition: transform .3s var(--chp-ease), box-shadow .3s var(--chp-ease); }
.ch-event:hover { transform: translateX(3px); box-shadow: var(--chp-shadow-lift); }
.ch-date { flex: 0 0 auto; width: 3.8em; text-align: center; background: var(--chp-accent-soft); border-radius: 14px; padding: .45em 0; line-height: 1.05; }
.ch-mon { display: block; font-size: .7em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--chp-accent-ink); }
.ch-num { display: block; font-size: 1.55em; font-weight: 800; color: var(--chp-ink); }
.ch-ebody a { font-weight: 650; text-decoration: none; color: inherit; display: block; font-size: 1.05em; }
.ch-ebody a:hover { color: var(--chp-primary); }
.ch-event-facts { background: var(--chp-base); border: 1px solid var(--chp-line); border-radius: var(--chp-radius); padding: 1.1em 1.4em .3em; margin-bottom: 1.6em; box-shadow: var(--chp-shadow); }
.ch-event-facts strong { display: inline-block; min-width: 4.5em; color: var(--chp-muted); font-weight: 600; }

/* Forms */
.ch-form label { display: block; font-weight: 600; margin-bottom: .35em; }
.ch-form input:not([type=checkbox]), .ch-form textarea { width: 100%; padding: .85em 1em; border: 1px solid var(--chp-line); border-radius: 14px; font: inherit; background: var(--chp-surface); box-sizing: border-box; transition: border-color .2s, box-shadow .2s, background .2s; }
.ch-form input:focus, .ch-form textarea:focus { outline: none; background: var(--chp-base); border-color: var(--chp-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--chp-primary) 15%, transparent); }
.ch-form .ch-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
@media (max-width: 640px) { .ch-form .ch-row { grid-template-columns: 1fr; } }
.ch-form .ch-check label { font-weight: 400; display: flex; gap: .5em; align-items: center; }
.ch-form input[type=checkbox] { width: 1.15em; height: 1.15em; accent-color: var(--chp-primary); }
.ch-hp { position: absolute !important; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.ch-notice { border-radius: 14px; padding: 1em 1.2em; margin-bottom: 1em; }
.ch-good { background: #E7F2EC; color: #2F6B4F; }
.ch-bad { background: #FBEAE6; color: #A23B2A; }

/* Livestream player */
.ch-player { position: relative; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; margin-bottom: 1em; box-shadow: var(--chp-shadow-lift);
  background: radial-gradient(70% 90% at 80% 0%, color-mix(in srgb, var(--chp-accent) 35%, transparent), transparent 60%), linear-gradient(135deg, var(--chp-primary), var(--chp-ink)); }
.ch-player video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; display: none; }
.ch-player.is-live video { display: block; }
.ch-player.is-live::before { content: "LIVE"; position: absolute; z-index: 2; top: 1rem; left: 1rem; padding: .42rem .8rem .42rem 1.6rem; border-radius: 999px; background: #D23B2E; color: #fff; font: 700 .78rem/1 system-ui, sans-serif; letter-spacing: .08em;
  box-shadow: 0 4px 14px rgba(210, 59, 46, .45); }
.ch-player.is-live::after { content: ""; position: absolute; z-index: 3; top: calc(1rem + .58rem); left: calc(1rem + .7rem); width: .45rem; height: .45rem; border-radius: 50%; background: #fff; animation: chp-pulse 1.4s infinite; }
@keyframes chp-pulse { 50% { opacity: .3; } }
.ch-player-note { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.5em; color: #fff; }
.ch-player-note p { margin: 0; max-width: 26em; line-height: 1.55; font-size: 1.05rem; }
.ch-player-note strong { display: block; font-size: 1.35rem; margin-bottom: .2em; }
.ch-player-note[hidden] { display: none; }
.ch-live-translate { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: .4rem 0 1rem; }

/* Live translation (Every Voice) */
.ch-translate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2.4rem; align-items: center; border-radius: 28px; padding: clamp(1.6rem, 4.5vw, 3rem); box-shadow: var(--chp-shadow);
  background: radial-gradient(60% 120% at 100% 0%, var(--chp-accent-soft), transparent 70%), var(--chp-base); border: 1px solid var(--chp-line); }
.ch-translate h2 { margin-top: .1em; font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -.02em; }
.ch-translate .ch-eyebrow { display: inline-flex; align-items: center; gap: .5em; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 700; color: var(--chp-accent-ink); margin: 0; }
.ch-translate-qr { display: grid; justify-items: center; gap: .5rem; text-decoration: none; color: var(--chp-muted); font-size: .85rem; font-weight: 600; }
.ch-translate-qr img { width: 190px; height: 190px; background: #fff; border-radius: 20px; border: 1px solid var(--chp-line); padding: 12px; box-shadow: var(--chp-shadow-lift); transition: transform .3s var(--chp-ease); }
.ch-translate-qr:hover img { transform: rotate(-2deg) scale(1.03); }
@media (max-width: 700px) { .ch-translate { grid-template-columns: 1fr; } .ch-translate-qr { justify-items: start; } }

.ch-demo-bar { background: var(--chp-ink); color: #fff; text-align: center; font-size: .88rem; padding: .55em 1em; }
.ch-demo-bar a { color: var(--chp-accent); font-weight: 600; }
