/* WC Personalizer — audio/video message section and recorder (4.26.0) */

.wcp-msg {
  margin: 4px 0 18px;
  padding: 14px 16px;
  border: 1.5px solid var(--wcp-border, #D4C4B0);
  border-radius: 8px;
  background: #fff;
}
.wcp-msg-title { font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.wcp-msg-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wcp-msg-choose[hidden], .wcp-msg-hint[hidden], .wcp-msg-progress[hidden], .wcp-msg-done[hidden] { display: none; }
.wcp-msg-option {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 92px; padding: 12px 8px;
  border: 1.5px solid var(--wcp-border, #D4C4B0); border-radius: 8px;
  background: #faf7f2; color: inherit; font: inherit; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.wcp-msg-option:hover, .wcp-msg-option:focus-visible { border-color: var(--wcp-btn-bg, #A0785A); background: #f5efe6; outline: none; }
.wcp-msg-icon { font-size: 1.6rem; line-height: 1; }
.wcp-msg-hint { margin: 8px 0 0; font-size: .8rem; color: #777; }

.wcp-msg-bar { height: 8px; border-radius: 4px; background: #eee; overflow: hidden; }
.wcp-msg-bar span { display: block; height: 100%; width: 0; background: var(--wcp-btn-bg, #A0785A); transition: width .3s; }
.wcp-msg-progress p { margin: 8px 0 0; font-size: .85rem; color: #555; }

.wcp-msg-ok { margin: 0 0 8px; font-weight: 600; color: #1e6e3e; }
.wcp-msg-done audio { width: 100%; }
.wcp-msg-done video { width: 100%; max-height: 260px; border-radius: 6px; background: #000; }
.wcp-msg-actions { margin: 8px 0 0; font-size: .85rem; }
.wcp-msg-link { background: none; border: 0; padding: 0; color: var(--wcp-btn-bg, #A0785A); text-decoration: underline; cursor: pointer; font: inherit; }
.wcp-msg-error { margin-top: 8px; font-size: .85rem; color: #b32d2e; }
.wcp-msg-error:empty { display: none; }
.wcp-msg-from { display: block; margin-top: 12px; font-size: .85rem; }
.wcp-msg-from input { display: block; width: 100%; margin-top: 4px; }

/* ── Recorder overlay (above the personalizer popup, z-index 999999) ── */
.wcp-rec-overlay {
  position: fixed; inset: 0; z-index: 1000001;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 16, 12, .72); padding: 16px;
}
.wcp-rec-panel {
  width: 100%; max-width: 520px; max-height: 100%; overflow: auto;
  background: #fff; border-radius: 12px; padding: 16px 18px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.wcp-rec-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 1.05rem; margin-bottom: 12px; }
.wcp-rec-x { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: #555; padding: 0 4px; }
.wcp-rec-x:disabled { opacity: .3; cursor: default; }
.wcp-rec-stage { position: relative; border-radius: 10px; overflow: hidden; background: #111; }
.wcp-rec-live, .wcp-rec-stage video.wcp-rec-review { display: block; width: 100%; max-height: 52vh; background: #000; object-fit: contain; }
.wcp-rec-stage [hidden], .wcp-rec-stage[hidden] { display: none !important; }
.wcp-mirror { transform: scaleX(-1); }
.wcp-rec-mic { position: relative; height: 180px; display: flex; align-items: center; justify-content: center; background: #2b2420; }
.wcp-rec-mic span { position: relative; font-size: 2.6rem; z-index: 1; }
.wcp-rec-level { position: absolute; width: 96px; height: 96px; border-radius: 50%; background: rgba(160,120,90,.45); transition: transform .08s; }
.wcp-rec-stage audio.wcp-rec-review { display: block; width: calc(100% - 24px); margin: 70px 12px; }
.wcp-rec-timer {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 3px 9px; border-radius: 12px; background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; font-variant-numeric: tabular-nums;
}
.wcp-rec-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #999; vertical-align: 1px; }
.wcp-rec-active .wcp-rec-dot { background: #e0322b; animation: wcp-blink 1s infinite; }
@keyframes wcp-blink { 50% { opacity: .2; } }
.wcp-rec-err { margin-top: 10px; font-size: .85rem; color: #b32d2e; }
.wcp-rec-err:empty { display: none; }
.wcp-rec-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.wcp-rec-controls button[hidden] { display: none; }
.wcp-rec-controls button {
  min-height: 46px; padding: 0 20px; border-radius: 23px; border: 1.5px solid var(--wcp-btn-bg, #A0785A);
  background: #fff; color: var(--wcp-btn-bg, #A0785A); font: inherit; font-weight: 600; cursor: pointer;
}
.wcp-rec-start, .wcp-rec-use { background: var(--wcp-btn-bg, #A0785A) !important; color: var(--wcp-btn-text, #FAF5EC) !important; }
.wcp-rec-stop { background: #e0322b !important; border-color: #e0322b !important; color: #fff !important; }
.wcp-rec-controls button:disabled { opacity: .45; cursor: default; }
.wcp-rec-flip { min-width: 46px; padding: 0 12px !important; font-size: 1.2rem !important; }
.wcp-rec-tip { margin: 14px 0 0; font-size: .82rem; color: #666; text-align: center; line-height: 1.45; }
