/*! © 2026 INEASY (ineasy.site). Все права защищены / All rights reserved.
 * Копирование, изменение и использование без письменного разрешения запрещено.
 * Copying, modification or use without written permission is prohibited. */
/* INEASY quality enhancer: its own section, the buy panel and the 5-tab dock */

/* ---------- Dock with five tabs ---------- */
.nav-tab[data-view='enhanceSection'] .nav-icon { --i: var(--ico-spark); }
@media (max-width: 1179px) {
  .bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); width: min(600px, calc(100% - 24px)); }
  .nav-tab { font-size: 0.58rem; letter-spacing: 0.02em; }
}

.pro-badge {
  justify-self: start;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--blue-500);
  color: #fff;
  font: 700 var(--fs-xs) / 1 var(--font-mono);
  letter-spacing: 0.14em;
}

/* ---------- Page ---------- */
.enh { display: grid; gap: 20px; max-width: 1080px; margin: 0 auto; padding-bottom: 28px; }
.enh-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.enh-head h1 { margin: 0 0 8px; font: 600 var(--fs-h1) / 1.05 var(--font-display); letter-spacing: -0.03em; }
.enh-head p { margin: 0; max-width: 60ch; color: var(--text-2); }
.enh-head .home-eyebrow { margin-bottom: 12px; }
.enh-access { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--ink-850); color: var(--text-2); font-size: var(--fs-sm); }
.enh-access.on #enhBuyBtn { display: none; }
.enh-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); align-items: start; }
.enh-main, .enh-side, .enh-progress, .enh-result {
  display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--ink-800), var(--ink-900));
}
.enh-main { align-content: start; }
.enh-side h2 { margin: 0; font: 600 var(--fs-md) / 1.2 var(--font-display); }
.enh-drop {
  display: grid; justify-items: center; gap: 4px; padding: 34px 16px; text-align: center; cursor: pointer;
  border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: rgba(3, 6, 12, 0.5);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.enh-drop:hover, .enh-drop.drag { border-color: var(--cyan-300); background: rgba(102, 217, 255, 0.06); }
.enh-drop input { display: none; }
.enh-drop .ic { color: var(--blue-300); font-size: 1.6rem; }
.enh-drop strong { font-weight: 600; overflow-wrap: anywhere; }
.enh-drop small { color: var(--text-3); }

.enh-bar { height: 6px; border-radius: var(--r-pill); background: var(--ink-700); overflow: hidden; }
.enh-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--blue-400); transition: width 0.3s var(--ease); }
.enh-bar.wait i { width: 35%; animation: enhSlide 1.2s ease-in-out infinite alternate; }
@keyframes enhSlide { from { margin-left: 0; } to { margin-left: 65%; } }
.enh-upload { display: grid; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }

.enh-warn { margin: 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--warn-wash); color: var(--warn); font-size: var(--fs-sm); }
.enh-original video, .enh-result video { width: 100%; max-height: 56dvh; border-radius: var(--r-md); background: #000; }

.enh-presets { display: grid; gap: 8px; max-height: 520px; overflow-y: auto; padding-right: 2px; }
.enh-preset {
  display: grid; gap: 4px; padding: 11px 13px; text-align: left; cursor: pointer; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(3, 6, 12, 0.4);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.enh-preset strong { font-weight: 600; font-size: var(--fs-sm); }
.enh-preset small { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.38; }
.enh-preset:hover:not([aria-disabled='true']) { border-color: var(--line-strong); }
.enh-preset.active { border-color: var(--blue-400); background: var(--blue-wash-strong); }
.enh-preset[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Tool Switcher (Enhance vs HDR10+ Converter) ---------- */
.enh-tool-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--ink-850);
}
.enh-tool-tab {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-2);
  font: 600 var(--fs-sm) / 1.25 var(--font-text);
  text-align: center;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.enh-tool-tab:hover { color: var(--text); }
.enh-tool-tab.active {
  border-color: var(--blue-400);
  background: var(--blue-500);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
@media (max-width: 520px) {
  .enh-tool-switch { grid-template-columns: 1fr; }
}

/* ---------- Compact Mode Selector & HDR10+ Info Card ---------- */
.enh-field { display: grid; gap: 8px; }
.enh-label { font: 600 var(--fs-sm) / 1.2 var(--font-display); color: var(--text); }
.enh-select-wrap { position: relative; }
.enh-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--blue-300);
  font-size: 0.95rem;
}
.enh-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 38px 10px 14px;
  border: 1px solid var(--blue-400);
  border-radius: var(--r-md);
  background: var(--ink-850);
  color: var(--text);
  font: 600 var(--fs-sm) / 1.3 var(--font-text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.enh-select:focus { outline: none; border-color: var(--cyan-300); box-shadow: 0 0 0 2px rgba(102, 217, 255, 0.18); }
.enh-select option { background: var(--ink-850); color: var(--text); padding: 8px; }

.enh-preset-card {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--blue-wash-strong);
}
.enh-preset-card strong { font-weight: 600; font-size: var(--fs-sm); color: var(--cyan-300); }
.enh-preset-card small { color: var(--text-2); font-size: var(--fs-xs); line-height: 1.42; }

.enh-regulator {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(3, 6, 12, 0.45);
}
.enh-reg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.enh-reg-val {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(102, 217, 255, 0.14);
  color: var(--cyan-300);
  font: 700 var(--fs-xs) / 1.2 var(--font-mono);
}
.enh-slider {
  width: 100%;
  height: 6px;
  margin: 4px 0 2px;
  accent-color: var(--blue-400);
  cursor: pointer;
}

.enh-hdr-box {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(3, 6, 12, 0.45);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.enh-hdr-box:hover { border-color: var(--line-strong); }
.enh-hdr-box input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--blue-400);
  cursor: pointer;
}
.enh-hdr-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
.enh-hdr-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.enh-hdr-row strong { font-weight: 600; font-size: var(--fs-sm); color: var(--text); }
.enh-hdr-badge {
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: rgba(46, 204, 113, 0.16);
  color: #4cd964;
  font: 700 0.65rem / 1.2 var(--font-mono);
  letter-spacing: 0.06em;
}
.enh-hdr-copy small { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.36; }

.enh-progress-top, .enh-progress-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text-2); font-size: var(--fs-sm); }
.enh-progress-top strong { color: var(--text); }
.enh-error { margin: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--err-wash); color: var(--err); font-size: var(--fs-sm); }

.enh-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.enh-result-head strong { color: var(--ok); }
.enh-tabs { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); }
.enh-tabs button { padding: 7px 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font: 600 var(--fs-sm) / 1 var(--font-text); cursor: pointer; }
.enh-tabs button.active { background: var(--blue-500); color: #fff; }
.enh-result-actions { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }

/* ---------- Buy panel ---------- */
.enh-sheet-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(3, 6, 12, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.enh-sheet-overlay.hidden { display: none; }
.enh-sheet {
  position: relative; display: grid; gap: 12px; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px;
  border: 1px solid var(--line-strong); border-radius: var(--r-xl); background: var(--ink-850); box-shadow: var(--shadow-pop);
}
.enh-sheet h2 { margin: 0; font: 600 var(--fs-h2) / 1.1 var(--font-display); }
.enh-sheet p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.enh-sheet-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--ink-700); color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.enh-perks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.enh-perks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: var(--fs-sm); }
.enh-perks li::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--cyan-300); }
.enh-price { font: 700 2.2rem / 1 var(--font-display); letter-spacing: -0.03em; }
.enh-price small { color: var(--text-2); font: 500 var(--fs-md) / 1 var(--font-text); }
.enh-sheet .enh-terms { color: var(--text-3); font-size: var(--fs-xs); }

@media (max-width: 860px) {
  .enh-grid { grid-template-columns: 1fr; }
  .enh-result-actions { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .enh-sheet-overlay { align-items: end; padding: 0; }
  .enh-sheet { width: 100%; max-height: 88dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Lock for users without a subscription ---------- */
.enh-stage { position: relative; }
/* without a subscription every tool, the tool switch included, sits blurred behind the lock card */
.enh-stage.locked { min-height: 340px; }
.enh-stage.locked .enh-tool-switch, .enh-stage.locked .enh-grid { filter: blur(3px); opacity: 0.45; pointer-events: none; user-select: none; }
.enh-lock { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; }
.enh-lock.hidden { display: none; }
.enh-lock-card { display: grid; justify-items: center; gap: 10px; max-width: 360px; padding: 28px 24px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--r-xl); background: var(--ink-850); box-shadow: var(--shadow-pop); }
.enh-lock-card .ic { font-size: 2rem; color: var(--text-2); }
.enh-lock-card strong { font: 600 var(--fs-md) / 1.2 var(--font-display); }
.enh-lock-card p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.btn-black {
  min-height: 48px; padding: 0 32px; border: 1px solid #3a3a3a; border-radius: var(--r-pill);
  background: #000; color: #fff; font: 600 var(--fs-md) / 1 var(--font-text); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn-black:hover { border-color: #fff; }
.btn-black:active { transform: scale(0.98); }

.enh-notice { margin: 8px 0; padding: 12px 14px; border: 1px solid #e0a030; border-radius: 12px; background: rgba(224, 160, 48, .12); font-size: 13.5px; line-height: 1.45; }
.enh-notice strong { display: block; margin-bottom: 4px; }
.enh-notice p { margin: 0; }
.enh-pause-notice { border-color: var(--cyan-300); background: rgba(102, 217, 255, 0.12); }
.enh-pause-notice strong { color: var(--cyan-300); }
