/* =============================================================
   BTV Interactive Studio — Elementor Widget Styles
   Brand: BTV Orange #F5631A | Viola #401F5E | Cream #FAF3E6
   ============================================================= */

/* ---------- Boot splash ---------- */
.btv-studio-boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  background: #FAF3E6;
  font-family: 'Roboto', sans-serif;
  color: #6B4A2A;
}
.btv-boot-bird { font-size: 2.5rem; margin-bottom: 8px; }

/* ---------- Root shell ---------- */
.btv-studio-root {
  font-family: 'Roboto', sans-serif;
  background: #FAF3E6;
  border-radius: 12px;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 20px rgba(64,31,94,.10);
}

/* ---------- Header ---------- */
.btv-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #ffffff;
  border-bottom: 1px solid #E7D4BB;
  gap: 12px;
  flex-wrap: wrap;
}
.btv-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btv-logo-circle {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #F5631A 0%, #D4500F 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.btv-brand-name  { font-family: 'Roboto Slab', serif; font-size: 0.7rem; font-weight: 700; color: #D4500F; }
.btv-brand-sub   { font-size: 0.65rem; color: #A67C52; }
.btv-header-sep  { width: 1px; height: 30px; background: #E7D4BB; flex-shrink: 0; }
.btv-lesson-input {
  font-family: 'Roboto Slab', serif;
  font-size: 0.82rem; font-weight: 600;
  color: #401F5E;
  background: transparent;
  border: none; outline: none;
  max-width: 260px; padding: 4px 6px;
  border-radius: 6px;
  transition: background .2s;
}
.btv-lesson-input:focus { background: #F5EBD8; }
.btv-saved-badge {
  font-size: 0.65rem; color: #3a9e6f;
  display: flex; align-items: center; gap: 3px;
}

.btv-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btv-pin-badge {
  display: flex; align-items: center; gap: 6px;
  background: #FDE9DC; border: 1px solid #F5C9A8;
  border-radius: 10px; padding: 6px 12px;
}
.btv-pin-label { font-size: 0.65rem; font-weight: 600; color: #D4500F; }
.btv-pin-code  { font-family: 'Roboto Slab', serif; font-size: 0.85rem; font-weight: 900; color: #D4500F; letter-spacing: 3px; }
.btv-users-badge {
  display: flex; align-items: center; gap: 4px;
  background: #F5EBD8; border-radius: 8px; padding: 5px 10px;
  font-size: 0.7rem; color: #6B4A2A;
}
.btv-users-badge strong { color: #401F5E; }
.btv-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.75rem; font-weight: 600;
  padding: 7px 14px; border-radius: 10px;
  cursor: pointer; transition: all .2s;
  border: 1px solid #E7D4BB; background: #fff; color: #6B4A2A;
  font-family: 'Roboto', sans-serif;
}
.btv-btn:hover  { border-color: #A67C52; }
.btv-btn-primary {
  background: linear-gradient(135deg, #F5631A 0%, #D4500F 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(245,99,26,.30);
}
.btv-btn-primary:hover { opacity: .9; }
.btv-btn-green {
  background: #22c55e; border-color: transparent; color: #fff;
}
.btv-btn-green:hover { background: #16a34a; }
.btv-btn-green:disabled { background: #E7D4BB; color: #A67C52; cursor: not-allowed; }

/* ---------- Body (3 columns) ---------- */
.btv-studio-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 420px;
}

/* --- Left nav --- */
.btv-slide-nav {
  width: 160px; flex-shrink: 0;
  background: #F5EBD8;
  border-right: 1px solid #E7D4BB;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.btv-nav-top {
  padding: 10px;
  border-bottom: 1px solid #E7D4BB;
}
.btv-btn-new-slide {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.7rem; font-weight: 700;
  color: #D4500F; background: #FDE9DC; border: 1px solid #F5C9A8;
  border-radius: 10px; padding: 7px;
  cursor: pointer; font-family: 'Roboto', sans-serif;
  transition: background .2s;
}
.btv-btn-new-slide:hover { background: #F5C9A8; }
.btv-slide-list {
  flex: 1; overflow-y: auto;
  padding: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.btv-slide-thumb {
  border-radius: 10px; border: 2px solid #E7D4BB;
  cursor: pointer; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  position: relative; background: #fff;
}
.btv-slide-thumb.active {
  border-color: #F5631A;
  box-shadow: 0 0 0 3px #FDE9DC;
}
.btv-thumb-inner {
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
}
.btv-thumb-inner p {
  font-size: 0.6rem; color: #A67C52;
  text-align: center; line-height: 1.3;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.btv-slide-num {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #D4500F; color: #fff;
  font-size: 0.55rem; font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.btv-slide-actions {
  position: absolute; top: 3px; right: 3px;
  display: none; gap: 2px;
}
.btv-slide-thumb:hover .btv-slide-actions { display: flex; }
.btv-slide-actions button {
  background: #fff; border: none; border-radius: 4px;
  cursor: pointer; padding: 2px;
  font-size: 0.65rem; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

/* --- Center canvas --- */
.btv-canvas-area {
  flex: 1;
  display: flex; flex-direction: column;
  background: #E7D4BB;
  overflow: hidden;
}
.btv-canvas-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: #F5EBD8; border-bottom: 1px solid #E7D4BB;
}
.btv-view-toggle {
  display: flex; gap: 4px;
  background: #E7D4BB; border: 1px solid #D6C4A8;
  border-radius: 10px; padding: 3px;
}
.btv-view-btn {
  font-size: 0.7rem; font-weight: 600;
  padding: 5px 12px; border-radius: 7px;
  cursor: pointer; border: none;
  transition: all .2s; font-family: 'Roboto', sans-serif;
  color: #A67C52; background: transparent;
}
.btv-view-btn.active {
  background: #fff; color: #D4500F;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}
.btv-canvas-wrap {
  flex: 1; display: flex; align-items: center;
  justify-content: center; padding: 20px; overflow: hidden;
}
.btv-canvas-card {
  background: #fff; border-radius: 16px;
  border: 1px solid #E7D4BB;
  box-shadow: 0 8px 32px rgba(64,31,94,.10);
  width: 100%; max-width: 640px;
  aspect-ratio: 16/9;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.btv-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px 4px;
}
.btv-card-brand {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Roboto Slab', serif;
  font-size: 0.7rem; font-weight: 700; color: #D4500F;
}
.btv-card-brand-dot {
  width: 22px; height: 22px; border-radius: 6px;
  background: #F5631A;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
}
.btv-card-pin { font-size: 0.65rem; color: #E7D4BB; }
.btv-card-pin strong { color: #6B4A2A; }
.btv-card-question {
  text-align: center; padding: 4px 20px 4px;
}
.btv-card-question h2 {
  font-family: 'Roboto Slab', serif;
  font-size: 1.1rem; font-weight: 700;
  color: #1A1009; line-height: 1.25;
  margin: 0;
}
.btv-card-question p {
  font-size: 0.72rem; color: #A67C52;
  margin: 2px 0 0;
}
.btv-card-viz {
  flex: 1; padding: 8px 20px 8px; overflow: hidden;
  display: flex; flex-direction: column;
}
.btv-card-foot {
  padding: 6px 20px;
  background: #FAF3E6;
  border-top: 1px solid #F5EBD8;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.65rem; color: #A67C52;
}
.btv-card-foot strong { color: #401F5E; }
.btv-live-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  animation: btv-pulse 1.4s ease-in-out infinite;
}
@keyframes btv-pulse {
  0%,100% { opacity: 1; } 50% { opacity: .35; }
}

/* --- Word Cloud --- */
.btv-wordcloud {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.btv-wordcloud-words {
  flex: 1;
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  align-content: center;
  gap: 8px 16px;
  overflow: hidden;
}
.btv-word {
  transition: all .6s ease;
  display: inline-block;
  line-height: 1.1;
}
.btv-wordcloud-empty {
  font-size: 0.75rem; color: #E7D4BB;
  text-align: center; width: 100%;
}
.btv-wordcloud-bars {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 6px; height: 48px; padding-bottom: 2px;
}
.btv-bar-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.btv-bar-rect {
  width: 22px; border-radius: 4px 4px 0 0;
  transition: height .6s ease;
  min-height: 6px;
}
.btv-bar-label { font-size: 0.45rem; color: #A67C52; max-width: 30px; text-align: center; overflow: hidden; white-space: nowrap; }

/* --- Multiple Choice bars --- */
.btv-mc-bars {
  flex: 1; display: flex; flex-direction: column;
  justify-content: flex-end; gap: 5px; padding-top: 8px;
}
.btv-mc-row { display: flex; align-items: center; gap: 8px; }
.btv-mc-label { font-size: 0.7rem; color: #6B4A2A; width: 100px; text-align: right; line-height: 1.2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.btv-mc-track { flex: 1; height: 26px; background: #F5EBD8; border-radius: 20px; overflow: hidden; position: relative; }
.btv-mc-fill { height: 100%; border-radius: 20px; transition: width .7s ease; }
.btv-mc-pct { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 0.65rem; font-weight: 700; color: #6B4A2A; }
.btv-mc-count { font-size: 0.65rem; color: #A67C52; width: 20px; text-align: right; }

/* --- Scale --- */
.btv-scale-wrap {
  flex: 1; display: flex; align-items: flex-end; justify-content: center;
  gap: 16px; padding-bottom: 4px;
}
.btv-scale-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.btv-scale-pct { font-size: 0.65rem; font-weight: 700; color: #6B4A2A; min-height: 14px; }
.btv-scale-bar { width: 38px; border-radius: 6px 6px 0 0; transition: height .7s ease; min-height: 6px; }
.btv-scale-emoji { font-size: 1.6rem; line-height: 1; }

/* --- Open Text --- */
.btv-opentext {
  flex: 1; display: flex; flex-wrap: wrap;
  align-content: flex-start; gap: 6px; padding-top: 6px;
  overflow: hidden;
}
.btv-text-bubble {
  background: #FDE9DC; border: 1px solid #F5C9A8;
  border-radius: 16px; padding: 6px 12px;
  font-size: 0.7rem; color: #401F5E;
}
.btv-text-bubble.waiting {
  background: transparent; border-color: #E7D4BB;
  border-style: dashed; color: #A67C52;
}

/* --- Participant View --- */
.btv-participant {
  flex: 1; display: flex; flex-direction: column;
  overflow-y: auto; gap: 10px;
}
.btv-participant-subtitle {
  font-size: 0.7rem; text-align: center; color: #A67C52;
}
.btv-section-label {
  font-size: 0.55rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: #D4500F; margin-bottom: 4px;
}
.btv-feelings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.btv-feeling-btn {
  border: 2px solid #E7D4BB; border-radius: 10px;
  padding: 6px 8px; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; font-family: 'Roboto', sans-serif;
  background: #fff; color: #1A1009;
  transition: all .2s;
}
.btv-feeling-btn.selected {
  border-color: #F5631A; background: #FDE9DC;
  color: #D4500F; box-shadow: 0 0 0 2px #F5C9A8;
}
.btv-custom-input {
  width: 100%; box-sizing: border-box;
  font-size: 0.72rem; border-radius: 10px;
  padding: 7px 12px;
  border: 1px solid #E7D4BB; outline: none;
  font-family: 'Roboto', sans-serif; color: #1A1009;
  background: #fff;
  transition: border-color .2s;
}
.btv-custom-input:focus { border-color: #F5631A; }
.btv-tension-box {
  background: #F5EBD8; border: 1px solid #E7D4BB;
  border-radius: 10px; padding: 10px;
}
.btv-tension-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.btv-tension-val { font-size: 1.2rem; font-weight: 900; color: #F5631A; }
.btv-tension-range { font-size: 0.55rem; color: #A67C52; display: flex; justify-content: space-between; margin-top: 2px; }
input[type=range] { width: 100%; cursor: pointer; accent-color: #F5631A; }
.btv-submit-btn {
  width: 100%; border-radius: 10px; padding: 9px;
  font-size: 0.82rem; font-weight: 700;
  color: #fff; border: none; cursor: pointer;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #F5631A 0%, #D4500F 100%);
  box-shadow: 0 3px 10px rgba(245,99,26,.30);
  transition: opacity .2s;
}
.btv-submit-btn:disabled {
  background: #E7D4BB; color: #A67C52; cursor: not-allowed;
  box-shadow: none;
}
.btv-submitted-cloud {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
}
.btv-submitted-ok { font-size: 0.7rem; font-weight: 700; color: #22c55e; }
.btv-submitted-words {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: 8px;
}
.btv-change-link {
  font-size: 0.65rem; text-decoration: underline;
  color: #A67C52; cursor: pointer; background: none; border: none;
  font-family: 'Roboto', sans-serif;
}

/* --- Right panel --- */
.btv-editor-panel {
  width: 264px; flex-shrink: 0;
  background: #fff;
  border-left: 1px solid #E7D4BB;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.btv-panel-tabs {
  display: flex; border-bottom: 1px solid #E7D4BB;
}
.btv-panel-tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 2px; padding: 10px 4px;
  font-size: 0.65rem; font-weight: 600;
  cursor: pointer; font-family: 'Roboto', sans-serif;
  border: none; background: transparent;
  color: #A67C52;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.btv-panel-tab.active {
  color: #D4500F;
  border-bottom-color: #F5631A;
  background: #FDE9DC;
}
.btv-panel-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.btv-panel-section { display: flex; flex-direction: column; gap: 8px; }
.btv-panel-label {
  font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: #A67C52; margin-bottom: 2px;
}
.btv-type-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 10px; border: 2px solid #E7D4BB;
  cursor: pointer; text-align: left;
  font-family: 'Roboto', sans-serif; background: #fff;
  transition: all .2s;
}
.btv-type-btn.active {
  border-color: #F5631A; background: #FDE9DC;
}
.btv-type-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: #F5EBD8; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.btv-type-btn.active .btv-type-icon { background: #F5631A; }
.btv-type-name { font-size: 0.72rem; font-weight: 600; color: #1A1009; }
.btv-type-desc { font-size: 0.6rem; color: #A67C52; }
.btv-type-radio {
  margin-left: auto; width: 16px; height: 16px;
  border-radius: 50%; border: 2px solid #E7D4BB;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.btv-type-btn.active .btv-type-radio { border-color: #F5631A; }
.btv-type-radio-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #F5631A;
}
.btv-panel-textarea, .btv-panel-input {
  width: 100%; box-sizing: border-box;
  font-size: 0.72rem; font-family: 'Roboto', sans-serif;
  border: 1px solid #E7D4BB; border-radius: 8px;
  padding: 8px 10px; color: #1A1009;
  background: #FAF3E6; resize: vertical; outline: none;
  transition: border-color .2s;
}
.btv-panel-textarea:focus,
.btv-panel-input:focus { border-color: #F5631A; background: #fff; }
.btv-option-row { display: flex; align-items: center; gap: 6px; }
.btv-option-badge {
  width: 20px; height: 20px; border-radius: 4px;
  background: #FDE9DC; color: #D4500F;
  font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btv-toggle-row {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.btv-toggle-label { flex: 1; font-size: 0.72rem; color: #6B4A2A; }
.btv-toggle-switch {
  width: 34px; height: 18px; border-radius: 9px;
  background: #E7D4BB;
  display: flex; align-items: center; padding: 1px;
  transition: background .2s; cursor: pointer; flex-shrink: 0;
}
.btv-toggle-switch.on { background: #F5631A; }
.btv-toggle-knob {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.20);
  transition: transform .2s;
}
.btv-toggle-switch.on .btv-toggle-knob { transform: translateX(16px); }
.btv-brand-card {
  background: #FDE9DC; border: 1px solid #F5C9A8;
  border-radius: 10px; padding: 10px;
}
.btv-brand-card-title {
  font-size: 0.7rem; font-weight: 700; color: #D4500F;
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 4px;
}
.btv-brand-card p { font-size: 0.68rem; color: #6B4A2A; line-height: 1.5; margin: 0; }
.btv-color-swatch-row { display: flex; align-items: center; gap: 8px; }
.btv-color-swatch {
  width: 26px; height: 26px; border-radius: 6px;
  border: 2px solid #E7D4BB; flex-shrink: 0;
}
.btv-color-name { flex: 1; font-size: 0.7rem; color: #6B4A2A; }
.btv-active-tick { font-size: 0.65rem; font-weight: 700; color: #D4500F; }

/* --- Motivational quote --- */
.btv-quote-box {
  background: #FAF3E6; border: 1px solid #E7D4BB;
  border-radius: 8px; padding: 10px;
  font-size: 0.7rem; color: #A67C52;
  text-align: center; font-style: italic;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .btv-slide-nav { display: none; }
  .btv-editor-panel { display: none; }
  .btv-studio-header { padding: 8px 12px; }
  .btv-canvas-wrap { padding: 10px; }
}
