/* 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-pair { display: inline-block; text-align: left; vertical-align: top; }
.hcp-crow { display: block; white-space: pre; color: #ffd54a; line-height: 1.05; text-transform: none; -webkit-text-stroke: 0; }
.hcp-lyr { display: block; white-space: pre; }
.hcp-text.hcp-box { background: rgba(0, 0, 0, .55); padding: .25em .6em; border-radius: .3em; }
.hcp-label { position: absolute; left: 28px; bottom: 26px; 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-label.hcp-label-top { top: 22px; bottom: auto; } /* коли текст знизу — підпис зверху */
.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; }

/* ---------- Сторінка презентації ---------- */
/* Активна вкладка (Огляд / Мультитрек / Презентація) — підкреслена, як на інших сторінках пісні */
.content.box_title span { color: #656565; border-bottom: 3px solid #17a2b8; padding-bottom: 6px; margin-right: 10px; }

/* Кольори сторінки (світла тема). Темна тема сайту перевизначає їх у template_dark.css */
.hcp-app { --hcp-accent: #17a2b8; --hcp-line: #e3e8ee; --hcp-muted: #6c7a89; --hcp-fg: #2b3440; --hcp-btn: #fff; --hcp-panel: #fbfcfd;
    --hcp-input: #fff; --hcp-soft: #f6f8fa; --hcp-kbd: #eef2f5; --hcp-dialog: #fff;
    --hcp-on: #2fbf71; --hcp-ok-bg: #e9f9f0; --hcp-ok-line: #bfe9d0; --hcp-ok-fg: #1c6b40; --hcp-warn-bg: #fff6d6; --hcp-warn-line: #f1df9a; --hcp-warn-fg: #6b4e00;
    color: var(--hcp-fg); letter-spacing: normal; }
.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: var(--hcp-btn); color: var(--hcp-fg);
    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: var(--hcp-on); border-color: var(--hcp-on); 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: var(--hcp-kbd); color: var(--hcp-fg); 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: var(--hcp-panel); 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: var(--hcp-fg); background: var(--hcp-input); }
.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: var(--hcp-input); }
.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: var(--hcp-input); }
.hcp-seg button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; color: var(--hcp-fg); 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, var(--hcp-soft) 0 10px, var(--hcp-kbd) 10px 20px); color: var(--hcp-fg); 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: var(--hcp-dialog); border-radius: 16px; max-width: 620px; width: 100%; max-height: 92vh; overflow: auto; padding: 22px; position: relative; color: var(--hcp-fg); }
.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: var(--hcp-btn); color: var(--hcp-fg); 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: var(--hcp-fg); background: var(--hcp-soft); }
.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: var(--hcp-fg); }
.hcp-steps li { margin-bottom: 6px; }

.hcp-live-bar { display: none; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--hcp-ok-bg); border: 1px solid var(--hcp-ok-line); color: var(--hcp-ok-fg);
    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: var(--hcp-warn-bg); border: 1px solid var(--hcp-warn-line); color: var(--hcp-warn-fg); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.hcp-song-switch.on { display: block; }

/* Порядок слайдів */
.hcp-order-modal .hcp-dialog { max-width: 720px; }
.hcp-ord-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; max-height: 46vh; overflow: auto; padding-right: 4px; }
.hcp-ord-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--hcp-line); border-radius: 10px; padding: 7px 8px; background: var(--hcp-btn); }
.hcp-ord-row.custom { border-style: dashed; }
.hcp-ord-n { min-width: 24px; text-align: center; color: var(--hcp-muted); font-size: 13px; }
.hcp-ord-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.hcp-ord-text { color: var(--hcp-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcp-ord-main textarea, .hcp-ord-add textarea, .hcp-ord-add select { width: 100%; border: 1px solid var(--hcp-line); border-radius: 8px; padding: 6px 8px;
    background: var(--hcp-input); color: var(--hcp-fg); font: inherit; font-size: 14px; resize: vertical; }
.hcp-ord-btns { display: flex; gap: 4px; }
.hcp-ord-btns button { border: 1px solid var(--hcp-line); background: var(--hcp-input); color: var(--hcp-fg); border-radius: 7px; width: 32px; height: 30px; cursor: pointer; }
.hcp-ord-btns button:hover:not(:disabled) { border-color: var(--hcp-accent); color: var(--hcp-accent); }
.hcp-ord-btns button:disabled { opacity: .35; cursor: default; }
.hcp-ord-add { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hcp-ord-add .hcp-field { min-width: 0; }
.hcp-ord-inline { display: flex; gap: 6px; }
.hcp-ord-inline select { flex: 1; min-width: 0; }
@media (max-width: 576px) { .hcp-ord-add { grid-template-columns: 1fr; } .hcp-ord-btns button { width: 28px; } }

/* Повноекранний показ на цьому пристрої */
.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; }
@media (hover: hover) { .hcp-full:hover .hcp-full-ui { opacity: 1; } }
.hcp-full.ui .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; }
@media (max-width: 576px) { .hcp-full-ui { bottom: 8px; } .hcp-full-ui button { padding: 7px 12px; font-size: 13px; } }


/* Друк (PDF) — кожен слайд на окремій сторінці */
/* Друк у PDF: сторінка 16:9 такого ж розміру, як слайд PowerPoint (13.333 x 7.5 дюйма = 1280 x 720 px),
   кожен слайд — рівно одна сторінка; масштаб задаємо точно (1280 / 1920), бо під час друку
   розміри не перераховуються і раніше слайди "з'їжджали" з чорними смугами */
@media print {
    @page { size: 13.333in 7.5in; margin: 0; }
    html, body { margin: 0 !important; padding: 0 !important; background: #000 !important; height: auto !important; min-height: 0 !important; overflow: visible !important; }
    body.hcp-printing > *:not(.hcp-print) { display: none !important; }
    .hcp-print { display: block !important; position: static !important; left: auto !important; width: 13.333in !important; }
    .hcp-print { width: 100% !important; }
    /* кожен слайд — готова картинка 16:9 на всю ширину сторінки */
    .hcp-print img {
        display: block; width: 100%; height: auto; max-height: 100vh; object-fit: contain; margin: 0 auto;
        page-break-after: always; break-after: page; page-break-inside: avoid; break-inside: avoid;
    }
    .hcp-print img:last-child { page-break-after: auto; break-after: auto; }
}
.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; }
}

/* ---------- FONKI.PRO: кольори сайту (градієнт шапки) ---------- */
.hcp-app { --hcp-accent: #7b67e6; }
.hcp-app .hcp-btn { border-radius: 12px; }
.hcp-app .hcp-btn.primary, .hcp-app .hcp-tab.active, .hcp-app .hcp-seg button.active { background: linear-gradient(90deg, #6767e8 0%, #e36775 100%); border-color: transparent; color: #fff; }
.hcp-app .hcp-thumb { border-radius: 14px; }
.hcp-app .hcp-thumb.active { outline-color: #e36775; }
.hcp-app .hcp-thumb.active .hcp-num { background: #e36775; }
.hcp-app .hcp-option:hover { box-shadow: 0 2px 10px rgba(103, 103, 232, .18); }
.hcp-modal .hcp-btn.primary { background: linear-gradient(90deg, #6767e8 0%, #e36775 100%); border-color: transparent; color: #fff; }
