/* VCUBE Studio Plus: design polish for the existing pages. Loaded after portal.css.
   Switch it off with 'design_polish' => false in studio/lib/settings.php. Same brand, only stronger contrast and easier tapping.
   Every text colour below was measured at 4.5:1 or more against its background, in light and dark mode. */

/* ---------- Colour contrast ---------- */
:root {
  --brand-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #0e7490 100%); /* white text stays readable across the whole gradient */
  --brand-text: #4f46e5;  /* brand colour for text on light surfaces */
  --muted: #5a6a80;
  --faint: #5f6c80;
  --success: #047857;
  --danger: #b91c1c;
  --info: #1d4ed8;
  --violet: #6d28d9;
}
:root[data-theme="dark"] {
  --brand-text: #a5b4fc;
  --faint: #8a93a8;
}
a,
.nav a.active,
.tone-brand,
.chip-brand,
.tabs .active .count,
.empty .empty-icon,
.step.current,
.thumb .thumb-icon,
.dropzone .dz-icon,
.agenda-date,
.choice input:checked + label,
.tabbar a.active { color: var(--brand-text); }
.btn-soft { --btn-fg: var(--brand-text); }
[style*="color:var(--brand-1)"] { color: var(--brand-text) !important; } /* a few pages set this colour inline, e.g. "Review →" */
:root[data-theme="dark"] .grad-text { background-image: linear-gradient(135deg, #a5b4fc, #c4b5fd, #67e8f9); }

.btn-success { --btn-bg: #047857; }
.btn-success:hover { background: #065f46; }
.btn-wa { --btn-bg: #15803d; }
.btn-wa:hover { background: #166534; }
.nav a .count { background: #4f46e5; }
.tabbar a .count, .pin { background: #dc2626; }

/* ---------- Focus you can see ---------- */
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }

/* ---------- Touch screens: 44px targets, and no zoom when typing ---------- */
@media (pointer: coarse) {
  .btn-sm, .tabs a, .tabs button { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
}
@media (max-width: 1024px), (pointer: coarse) {
  .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea,
  .composer textarea, .input, .select, .textarea { font-size: 16px; }
}

/* ---------- Loading: thin bar while the next page opens, shimmer while previews load ---------- */
.stp-progress { position: fixed; z-index: 120; left: 0; top: 0; height: 3px; width: 0; background: #4f46e5; box-shadow: 0 0 10px rgba(79, 70, 229, .6); pointer-events: none;
  transition: width 8s cubic-bezier(.1, .7, .2, 1), opacity .3s; opacity: 0; }
.stp-progress.stp-go { width: 85%; opacity: 1; }
.viewer img.skeleton, .viewer iframe.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%; min-height: 240px; min-width: min(240px, 100%); }

/* ---------- Team phone tab bar: "More" ---------- */
.stp-more-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px;
  border: 0; border-radius: 14px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.stp-more-tab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stp-more-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stp-more-list a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 14px; border-radius: 14px; background: var(--surface-2); color: var(--text);
  font-weight: 650; text-decoration: none !important; }
.stp-more-list a:hover { background: var(--surface-3); }
.stp-more-list a .count { margin-left: auto; }

@media (prefers-reduced-motion: reduce) { .stp-progress { transition: none; } }
@media print { .stp-progress, .stp-more-tab { display: none !important; } }
