/* ==========================================================================
   Kora Voice Widget — Krepling WooCommerce Plugin
   ========================================================================== */

/* ── Launcher ── */
#kora-launch {
  position: fixed;
  z-index: 9000;
  right: 26px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  background: none;
  border: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 0;
  text-align: left;
}

.kora-launch__orb {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  position: relative;
  flex: none;
  background: radial-gradient(circle at 36% 30%, #E9D4FF, #9E45FF 52%, #6E00C4 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 14px 34px -8px rgba(131,0,233,.6), 0 0 34px -4px rgba(150,20,255,.5);
  animation: koraBreathe 4.5s ease-in-out infinite;
}
.kora-launch__orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 37% 28%, rgba(255,255,255,.9), transparent 46%);
}
.kora-launch__orb .halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(158,69,255,.6);
  animation: koraLaunchHalo 3.4s ease-out infinite;
}
.kora-launch__orb .halo:nth-child(2) { animation-delay: 1.7s; }

@keyframes koraLaunchHalo {
  0%   { transform: scale(.9); opacity: .7; }
  100% { transform: scale(1.7); opacity: 0; }
}
@keyframes koraBreathe {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

.kora-launch__lbl {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 13px;
  padding: 9px 14px;
  box-shadow: 0 12px 30px -16px rgba(14,14,23,.5);
}
.kora-launch__lbl .l1 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #0E0E17;
}
.kora-launch__lbl .l2 {
  font-size: 12px;
  color: #5A5A68;
  margin-top: 1px;
}

/* ── Main panel ── */
#kora-panel {
  position: fixed;
  z-index: 9100;
  right: 24px;
  bottom: 24px;
  width: 404px;
  max-width: calc(100vw - 28px);
  height: 644px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 40px 100px -28px rgba(11,5,24,.75), 0 0 0 1px rgba(11,5,24,.35);
  transform-origin: bottom right;
  transform: translateY(26px) scale(.92);
  opacity: 0;
  pointer-events: none;
  transition: transform .45s cubic-bezier(.2,.9,.25,1), opacity .32s ease;
  background: radial-gradient(120% 80% at 50% -10%, #2A0F4D 0%, #18092F 50%, #0B0518 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#kora-panel.is-open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

/* Aura blobs */
.kora-aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: .55;
  pointer-events: none;
}
.kora-aura.a1 {
  width: 280px;
  height: 280px;
  left: -80px;
  top: -70px;
  background: radial-gradient(circle, #7d28d6, transparent 68%);
  animation: koraAuraA 20s ease-in-out infinite;
}
.kora-aura.a2 {
  width: 260px;
  height: 260px;
  right: -70px;
  bottom: -40px;
  background: radial-gradient(circle, #4a1d8a, transparent 68%);
  animation: koraAuraB 26s ease-in-out infinite;
}
@keyframes koraAuraA {
  0%, 100% { transform: translate(0,0); }
  50%       { transform: translate(22px, 18px); }
}
@keyframes koraAuraB {
  0%, 100% { transform: translate(0,0); }
  50%       { transform: translate(-18px, -14px); }
}

/* Top bar */
.kora-top {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 15px 11px;
  z-index: 2;
}
.kora-top__close {
  width: 32px;
  height: 32px;
  padding: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(255,255,255,.7);
  transition: .15s;
  line-height: 0;
  font-family: inherit;
}
.kora-top__close:hover { background: rgba(255,255,255,.18); color: #fff; }
.kora-top__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  flex: 1;
}
.kora-top__cart {
  width: 32px;
  height: 32px;
  padding: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(255,255,255,.7);
  transition: .15s;
  position: relative;
  line-height: 0;
  font-family: inherit;
}
.kora-top__cart:hover { background: rgba(255,255,255,.18); color: #fff; }
.kora-top__cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #8300E9;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 1.5px solid #0B0518;
}

/* Orb */
.kora-orb-wrap {
  width: 130px;
  height: 130px;
  position: relative;
  margin: 20px auto 8px;
  flex: none;
  z-index: 2;
}
.kora-orb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #E9D4FF, #9E45FF 48%, #6E00C4 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset, 0 20px 60px -16px rgba(131,0,233,.8), 0 0 60px -10px rgba(150,20,255,.6);
  cursor: pointer;
  transition: transform .2s;
  position: relative;
}
.kora-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, rgba(255,255,255,.85), transparent 48%);
}
.kora-orb:hover { transform: scale(1.04); }
.kora-orb.live  { animation: koraOrbPulse 1.8s ease-in-out infinite; }
@keyframes koraOrbPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset, 0 20px 60px -16px rgba(131,0,233,.8), 0 0 60px -10px rgba(150,20,255,.6); }
  50%       { box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset, 0 20px 60px -16px rgba(131,0,233,1),   0 0 80px -4px  rgba(150,20,255,.9); }
}

/* Waveform bars */
.kora-bars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.kora-bars i {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 2.5px;
  border-radius: 3px;
  background: rgba(180,80,255,.7);
  transform-origin: bottom center;
  height: 8px;
  margin-left: -1.25px;
}

/* State label */
.kora-state {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  letter-spacing: .04em;
  text-transform: uppercase;
  z-index: 2;
  margin-top: 4px;
  flex-shrink: 0;
}

/* Chat area */
.kora-chat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 22px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  z-index: 2;
  scrollbar-width: none;
  margin-top: 8px;
}
.kora-chat::-webkit-scrollbar { display: none; }
.kora-chat__greeting {
  margin: auto;
  font-size: 16.5px;
  font-weight: 500;
  color: rgba(255,255,255,.92);
  line-height: 1.45;
  text-align: center;
  padding: 0 6px;
}
.kora-msg--aria {
  font-size: 15.5px;
  font-weight: 500;
  color: rgba(255,255,255,.9);
  line-height: 1.5;
  text-align: center;
}
.kora-msg--user {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  font-style: italic;
  text-align: center;
}
.kora-msg--system {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  text-align: center;
  font-style: italic;
}
.kora-msg--error {
  font-size: 13px;
  color: rgba(255,100,100,.8);
  text-align: center;
}

/* Quick prompts */
.kora-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 8px 20px;
  z-index: 2;
}
.kora-quick button {
  font-size: 12.5px;
  color: rgba(255,255,255,.75);
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.07);
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
}
.kora-quick button:hover { background: rgba(255,255,255,.14); color: #fff; }
.kora-quick.hide { display: none; }

/* Type input */
#kora-panel .kora-type-wrap {
  width: 100%;
  display: none;
  padding: 6px 16px 0;
  z-index: 2;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 2px;
}
#kora-panel .kora-type-wrap.show { display: flex; gap: 8px; align-items: flex-end; }
#kora-panel .kora-input {
  flex: 1;
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  resize: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  min-height: 42px;
  max-height: 120px;
}
#kora-panel .kora-input::placeholder { color: rgba(255,255,255,.35); }
#kora-panel .kora-input:focus { border-color: rgba(131,0,233,.6) !important; background: rgba(255,255,255,.11) !important; }

/* Footer */
.kora-foot {
  width: 100%;
  padding: 10px 16px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  flex-shrink: 0;
}
.kora-mic {
  width: 52px;
  height: 52px;
  padding: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .2s;
  flex: none;
  line-height: 0;
  font-family: inherit;
}
.kora-mic:hover  { background: rgba(255,255,255,.18); }
.kora-mic.active { background: rgba(131,0,233,.4); border-color: rgba(131,0,233,.6); }
.kora-mic svg    { width: 22px; height: 22px; color: rgba(255,255,255,.8); }
.kora-type-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .15s;
  flex: none;
  color: rgba(255,255,255,.6);
  line-height: 0;
  font-family: inherit;
}
.kora-type-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.kora-type-btn.active { background: rgba(131,0,233,.3); border-color: rgba(131,0,233,.5); color: #fff; }

/* ── QR overlay ── */
#kora-qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 9200;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#kora-qr-overlay.show { display: flex; }
.kora-qr-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 40px 80px rgba(0,0,0,.35);
  position: relative;
}
.kora-qr-head {
  text-align: center;
  margin-bottom: 20px;
}
.kora-qr-head h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0E0E17;
}
.kora-qr-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  padding: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 50%;
  background: #F3F1EB;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #5A5A68;
  line-height: 0;
  font-family: inherit;
  transition: .15s;
}
.kora-qr-close:hover { background: #E7E4DC; color: #0E0E17; }
.kora-qr-img {
  border-radius: 12px;
  border: 1px solid #E7E4DC;
  display: block;
  margin: 0 auto 16px;
  width: 220px;
  height: 220px;
}
.kora-qr-hint {
  font-size: 13px;
  color: #5A5A68;
  line-height: 1.5;
}

/* ── Feedback toast ── */
.kora-feedback {
  position: fixed;
  bottom: 96px;
  right: 24px;
  background: #0E0E17;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
  z-index: 9300;
  pointer-events: none;
  animation: koraToastIn .2s ease both, koraToastOut .3s ease 2.7s both;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@keyframes koraToastIn  { from { opacity: 0; transform: translateY(8px); } to   { opacity: 1; transform: translateY(0); } }
@keyframes koraToastOut { from { opacity: 1; }                             to   { opacity: 0; } }

/* ── Mobile ── */
@media (max-width: 480px) {
  #kora-launch { right: 16px; bottom: 16px; }
  #kora-panel  { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .kora-feedback { right: 16px; bottom: 80px; }
}

/* ── Shop2 In-panel Checkout Overlay ── */
.kora-checkout-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(18, 10, 40, 0.97);
  border-radius: inherit;
  z-index: 20;
  padding: 20px;
  flex-direction: column;
  overflow-y: auto;
}
.kora-checkout-overlay.show { display: flex; }
.kora-checkout-inner { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.kora-checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.kora-checkout-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kora-checkout-close:hover { color: #fff; }
.kora-checkout-items {
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 60px;
}
.kora-checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.kora-checkout-item-name { color: rgba(255,255,255,.9); font-size: 13px; }
.kora-checkout-item-price { color: #c4b5fd; font-size: 13px; font-weight: 600; }
.kora-checkout-loading, .kora-checkout-empty {
  color: rgba(255,255,255,.5);
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
  padding: 8px 0;
}
.kora-checkout-total {
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 0 4px;
}
.kora-checkout-pay-btn {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: opacity .15s;
}
.kora-checkout-pay-btn:hover { opacity: .85; }
