/* HOLYCHORDS — презентації пісень */

/* ---------- Слайд (спільне для прев'ю та екрана) ---------- */
.hcp-frame { position: relative; overflow: hidden; background: #000; aspect-ratio: 16 / 9; width: 100%; }
.hcp-stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: 50% 50%; overflow: hidden; }
.hcp-bg, .hcp-video, .hcp-dim { position: absolute; inset: 0; width: 100%; height: 100%; }
.hcp-video { object-fit: cover; display: none; }
.hcp-bg.hcp-anim { background-size: 160% 160% !important; animation: hcp-aurora 24s ease-in-out infinite alternate; }
@keyframes hcp-aurora { 0% { background-position: 0% 0%; } 50% { background-position: 100% 40%; } 100% { background-position: 30% 100%; } }
.hcp-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; box-sizing: border-box; }
.hcp-text { overflow-wrap: break-word; word-break: normal; transition: opacity .25s; }
.hcp-text > div { min-height: 1em; }
.hcp-text.hcp-box { background: rgba(0, 0, 0, .55); padding: .25em .6em; border-radius: .3em; }
.hcp-label { position: absolute; left: 28px; top: 22px; padding: 6px 18px; border-radius: 30px; background: rgba(0, 0, 0, .55);
    color: #ffd54a; font: 700 54px/1.2 Montserrat, Arial, sans-serif; letter-spacing: .5px; text-transform: uppercase; }
.hcp-stage.hcp-black .hcp-bg, .hcp-stage.hcp-black .hcp-video, .hcp-stage.hcp-black .hcp-wrap, .hcp-stage.hcp-black .hcp-label { opacity: 0; }
.hcp-stage.hcp-black { background: #000 !important; }
.hcp-stage .hcp-bg, .hcp-stage .hcp-wrap { transition: opacity .3s; }

/* ---------- Сторінка презентації ---------- */
.hcp-app { --hcp-accent: #17a2b8; --hcp-line: #e3e8ee; --hcp-muted: #6c7a89; color: #2b3440; }
.hcp-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.hcp-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--hcp-line); background: #fff; color: #2b3440;
    border-radius: 10px; padding: 8px 14px; font-size: 14px; line-height: 1.2; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.hcp-btn:hover { border-color: var(--hcp-accent); color: var(--hcp-accent); }
.hcp-btn.primary { background: var(--hcp-accent); border-color: var(--hcp-accent); color: #fff; }
.hcp-btn.primary:hover { filter: brightness(1.08); color: #fff; }
.hcp-btn.on { background: #2fbf71; border-color: #2fbf71; color: #fff; }
.hcp-btn small { opacity: .75; }
.hcp-spacer { flex: 1; }
.hcp-hint { color: var(--hcp-muted); font-size: 13px; margin: -6px 0 12px; }
.hcp-hint kbd { background: #eef2f5; color: #2b3440; border-radius: 4px; padding: 1px 6px; font-size: 12px; box-shadow: none; }

.hcp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hcp-thumb { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; outline: 3px solid transparent; outline-offset: 2px;
    transition: outline-color .15s, transform .15s; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.hcp-thumb:hover { transform: translateY(-2px); }
.hcp-thumb.active { outline-color: #ff4d4f; }
.hcp-thumb .hcp-bg.hcp-anim { animation: none; } /* анімований фон — лише на екрані, не в прев'ю */
.hcp-thumb .hcp-num { position: absolute; right: 8px; bottom: 6px; z-index: 3; color: #fff; font-size: 12px; background: rgba(0, 0, 0, .5);
    border-radius: 10px; padding: 1px 7px; }
.hcp-thumb.active .hcp-num { background: #ff4d4f; }

/* Панель налаштувань */
.hcp-panel { border: 1px solid var(--hcp-line); border-radius: 14px; padding: 16px; margin-bottom: 16px; background: #fbfcfd; display: none; }
.hcp-panel.open { display: block; }
.hcp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.hcp-tab { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; color: var(--hcp-muted); cursor: pointer; font-size: 14px; }
.hcp-tab.active { background: var(--hcp-accent); color: #fff; }
.hcp-pane { display: none; }
.hcp-pane.active { display: block; }
.hcp-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-bottom: 12px; }
.hcp-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--hcp-muted); min-width: 150px; }
.hcp-field select, .hcp-field input[type=number] { border: 1px solid var(--hcp-line); border-radius: 8px; padding: 6px 8px; color: #2b3440; background: #fff; }
.hcp-field input[type=range] { width: 180px; accent-color: var(--hcp-accent); }
.hcp-field input[type=color] { width: 56px; height: 34px; border: 1px solid var(--hcp-line); border-radius: 8px; padding: 2px; background: #fff; }
.hcp-check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; user-select: none; }
.hcp-check input { accent-color: var(--hcp-accent); width: 17px; height: 17px; }
.hcp-seg { display: inline-flex; border: 1px solid var(--hcp-line); border-radius: 9px; overflow: hidden; background: #fff; }
.hcp-seg button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; color: #2b3440; font-size: 14px; }
.hcp-seg button + button { border-left: 1px solid var(--hcp-line); }
.hcp-seg button.active { background: var(--hcp-accent); color: #fff; }

/* 3x3 сітка розташування */
.hcp-pos { display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(3, 22px); gap: 4px; padding: 6px;
    border: 1px solid var(--hcp-line); border-radius: 9px; background: #1d2633; width: max-content; }
.hcp-pos button { border: 0; border-radius: 4px; background: rgba(255, 255, 255, .15); cursor: pointer; padding: 0; }
.hcp-pos button.active { background: #ffd54a; }

.hcp-bgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.hcp-bgitem { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; cursor: pointer; overflow: hidden; outline: 3px solid transparent; outline-offset: 2px; border: 0; padding: 0; }
.hcp-bgitem.active { outline-color: var(--hcp-accent); }
.hcp-bgitem span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7));
    padding: 10px 4px 3px; text-align: center; text-shadow: 0 1px 2px #000; }
.hcp-bgitem.add { background: repeating-linear-gradient(45deg, #eef2f5 0 10px, #e5eaef 10px 20px); color: #2b3440; display: flex; align-items: center;
    justify-content: center; flex-direction: column; font-size: 12px; gap: 4px; }
.hcp-bgitem.add span { position: static; background: none; color: inherit; text-shadow: none; padding: 0; }

/* Модальні вікна */
.hcp-modal { position: fixed; inset: 0; z-index: 2147482000; background: rgba(10, 16, 24, .6); display: none; align-items: center; justify-content: center; padding: 16px; }
.hcp-modal.open { display: flex; }
.hcp-dialog { background: #fff; border-radius: 16px; max-width: 620px; width: 100%; max-height: 92vh; overflow: auto; padding: 22px; position: relative; color: #2b3440; }
.hcp-dialog h4 { margin: 0 0 6px; font-size: 20px; }
.hcp-dialog p { color: var(--hcp-muted); font-size: 14px; }
.hcp-close { position: absolute; right: 12px; top: 10px; border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: #8a96a3; }
.hcp-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.hcp-option { border: 1px solid var(--hcp-line); border-radius: 12px; padding: 12px; cursor: pointer; background: #fff; text-align: left; transition: border-color .15s, box-shadow .15s; }
.hcp-option:hover { border-color: var(--hcp-accent); box-shadow: 0 2px 10px rgba(23, 162, 184, .15); }
.hcp-option b { display: block; font-size: 15px; margin-bottom: 3px; }
.hcp-option small { color: var(--hcp-muted); font-size: 12px; line-height: 1.3; display: block; }
.hcp-option i { color: var(--hcp-accent); margin-right: 4px; }
.hcp-linkbox { display: flex; gap: 8px; margin: 8px 0 14px; }
.hcp-linkbox input { flex: 1; min-width: 0; border: 1px solid var(--hcp-line); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #2b3440; background: #f6f8fa; }
.hcp-qr { display: flex; justify-content: center; margin: 10px 0; }
.hcp-qr canvas, .hcp-qr img { border: 10px solid #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.hcp-steps { padding-left: 20px; font-size: 14px; color: #2b3440; }
.hcp-steps li { margin-bottom: 6px; }

.hcp-live-bar { display: none; align-items: center; gap: 10px; flex-wrap: wrap; background: #e9f9f0; border: 1px solid #bfe9d0; color: #1c6b40;
    border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.hcp-live-bar.on { display: flex; }
.hcp-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 0 rgba(47, 191, 113, .6); animation: hcp-pulse 1.6s infinite; }
@keyframes hcp-pulse { 70% { box-shadow: 0 0 0 9px rgba(47, 191, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0); } }
.hcp-song-switch { display: none; background: #fff6d6; border: 1px solid #f1df9a; color: #6b4e00; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.hcp-song-switch.on { display: block; }

/* Повноекранний показ на цьому пристрої */
.hcp-full { position: fixed; inset: 0; z-index: 2147483000; background: #000; display: none; cursor: none; }
.hcp-full.open { display: block; }
.hcp-full .hcp-frame { width: 100vw; height: 100vh; aspect-ratio: auto; }
.hcp-full-ui { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; opacity: 0; transition: opacity .3s; z-index: 5; cursor: default; }
.hcp-full:hover .hcp-full-ui, .hcp-full.touch .hcp-full-ui { opacity: 1; }
.hcp-full:hover { cursor: default; }
.hcp-full-ui button { border: 0; border-radius: 30px; background: rgba(0, 0, 0, .6); color: #fff; padding: 10px 16px; font-size: 15px; cursor: pointer; }

/* Темна тема сайту */
body.dark .hcp-app, html.dark .hcp-app { color: #dce3ea; }

/* Друк (PDF) — кожен слайд на окремій сторінці */
@media print {
    body.hcp-printing > *:not(.hcp-print) { display: none !important; }
    .hcp-print { display: block !important; position: static !important; left: auto !important; width: 100% !important; }
    .hcp-print .hcp-frame { width: 100%; page-break-after: always; break-after: page; }
    @page { size: landscape; margin: 0; }
}
.hcp-print { display: none; }

@media (max-width: 576px) {
    .hcp-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .hcp-btn { padding: 7px 10px; font-size: 13px; }
    .hcp-label { font-size: 44px; }
    .hcp-field input[type=range] { width: 140px; }
}
