/* Bunn 3B.1 v2 — Living Atmospheres
   Presentation-only enhancement over the accepted v10.12.8 Mood behavior.
   IMPORTANT: audio/text state ownership remains in bunn-v1012-start.js (BUILD 1012960).
*/

body.bunn-v1012-mood{
  --b3a-line:rgba(255,255,255,.12);
  --b3a-muted:rgba(255,255,255,.58);
  --b3a-dim:rgba(255,255,255,.38);
  --b3a-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--tg-content-safe-bottom,0px));
  background:#040207!important;
}

/* Deeper, calmer field. Premium motion stays low-amplitude. */
body.bunn-v1012-mood .v1012-mood{
  background:
    radial-gradient(ellipse at 50% 34%,rgba(122,83,255,.18),transparent 28%),
    radial-gradient(ellipse at 17% 72%,rgba(213,88,174,.075),transparent 32%),
    radial-gradient(ellipse at 86% 66%,rgba(69,112,255,.085),transparent 32%),
    linear-gradient(165deg,#030207 0%,#0a0610 47%,#050208 100%)!important;
}
body.bunn-v1012-mood .v1012-mood::before{
  inset:-42%;
  opacity:.62;
  filter:blur(52px);
  animation-duration:34s;
}
body.bunn-v1012-mood .v1012-mood::after{opacity:.10}
body.bunn-v1012-mood .v10122-stars{
  opacity:.72;
  animation-duration:8.8s;
}

/* Keep the already-good Bunn core. Only refine its breathing and voice reactions. */
body.bunn-v1012-mood .v1012-orbit-stage{
  inset:max(48px,calc(var(--v10128-safe-top) + 24px)) 0 max(118px,calc(var(--b3a-safe-bottom) + 100px));
  overflow:visible;
}
body.bunn-v1012-mood .v1012-orb-wrap{top:42%}
body.bunn-v1012-mood .v1012-orb{
  width:154px;
  height:154px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.045),
    0 0 40px rgba(139,99,255,.34),
    0 0 112px rgba(128,74,255,.24),
    0 34px 92px rgba(0,0,0,.48);
  animation-duration:5.2s;
}
body.bunn-v1012-mood .v1012-orb.is-speaking{
  box-shadow:
    0 0 0 1px rgba(255,255,255,.075),
    0 0 52px rgba(177,120,255,.48),
    0 0 132px rgba(126,77,255,.31),
    0 36px 96px rgba(0,0,0,.50);
}

/* Presentation-only intro states are written by bunn-v1021-mood-premium.js. */
body.bunn-v1012-mood .v1012-mood[data-v1021-intro="1"] .v1012-orb{
  filter:saturate(1.02) brightness(1.01);
}
body.bunn-v1012-mood .v1012-mood[data-v1021-intro="2"] .v1012-orb{
  filter:saturate(1.08) brightness(1.035);
}
body.bunn-v1012-mood .v1012-mood[data-v1021-intro="3"] .v1012-orb{
  filter:saturate(1.13) brightness(1.055);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.07),
    0 0 58px rgba(168,111,255,.44),
    0 0 144px rgba(126,77,255,.28),
    0 36px 96px rgba(0,0,0,.50);
}

/* ----- Living Mood Objects -------------------------------------------------
   Existing semantic buttons stay intact for behavior/accessibility.
   Visually, the emoji-circle UI is retired. Each option becomes a small
   animated atmosphere + typography label, with no text inside a circle.
--------------------------------------------------------------------------- */
body.bunn-v1012-mood .v1012-bubbles{
  position:absolute;
  inset:0;
  z-index:12;
  pointer-events:none;
  overflow:visible;
}

body.bunn-v1012-mood .v1012-bubble-float{
  width:118px!important;
  height:100px!important;
  margin:0!important;
  pointer-events:none!important;
  will-change:transform;
  animation-duration:calc(var(--dur) * 1.28)!important;
}

body.bunn-v1012-mood .v1012-bubble{
  --mood-a:126,103,238;
  --mood-b:207,103,194;
  --mood-c:255,255,255;
  width:118px!important;
  height:100px!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:3px!important;
  overflow:visible!important;
  pointer-events:auto!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:transparent!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  box-shadow:none!important;
  text-align:center!important;
  transform:none!important;
  transition:opacity .28s ease,filter .28s ease!important;
  -webkit-tap-highlight-color:transparent;
}

/* The old emoji node becomes the visual atmosphere carrier. Emoji glyph is hidden. */
body.bunn-v1012-mood .v1012-bubble>span{
  position:relative;
  isolation:isolate;
  display:block!important;
  flex:0 0 auto;
  width:58px!important;
  height:58px!important;
  margin:0 0 3px!important;
  border:1px solid rgba(255,255,255,.13)!important;
  border-radius:48% 52% 55% 45%/52% 44% 56% 48%!important;
  font-size:0!important;
  line-height:0!important;
  color:transparent!important;
  background:
    radial-gradient(circle at 31% 25%,rgba(255,255,255,.88) 0 4%,rgba(255,255,255,.22) 8%,transparent 25%),
    radial-gradient(circle at 68% 72%,rgba(var(--mood-b),.54),transparent 48%),
    radial-gradient(circle at 30% 72%,rgba(var(--mood-a),.63),transparent 54%),
    linear-gradient(145deg,rgba(var(--mood-a),.84),rgba(var(--mood-b),.62))!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.22),
    inset 0 -14px 28px rgba(6,3,12,.22),
    0 0 20px rgba(var(--mood-a),.23),
    0 15px 32px rgba(0,0,0,.24)!important;
  filter:saturate(1.08);
  transform:translateZ(0);
  animation:v1021MoodBody 7.4s cubic-bezier(.42,0,.58,1) infinite;
  transition:
    transform .20s cubic-bezier(.22,.9,.26,1),
    filter .24s ease,
    box-shadow .24s ease,
    border-color .24s ease!important;
}

body.bunn-v1012-mood .v1012-bubble>span::before{
  content:"";
  position:absolute;
  inset:8px;
  z-index:2;
  border:1px solid rgba(255,255,255,.20);
  border-radius:44% 56% 46% 54%/55% 47% 53% 45%;
  background:
    linear-gradient(125deg,rgba(255,255,255,.10),transparent 52%),
    radial-gradient(circle at 62% 40%,rgba(255,255,255,.16),transparent 34%);
  opacity:.78;
  animation:v1021MoodMembrane 8.2s ease-in-out infinite;
}

body.bunn-v1012-mood .v1012-bubble>span::after{
  content:"";
  position:absolute;
  z-index:3;
  width:6px;
  height:6px;
  left:17px;
  top:15px;
  border-radius:50%;
  background:rgba(255,255,255,.72);
  box-shadow:
    19px 13px 0 -1px rgba(255,255,255,.30),
    7px 27px 0 -2px rgba(255,255,255,.44);
  opacity:.62;
  filter:blur(.2px);
  animation:v1021MoodParticles 5.9s ease-in-out infinite;
}

body.bunn-v1012-mood .v1012-bubble b{
  display:block!important;
  width:116px!important;
  max-width:116px!important;
  min-height:23px;
  margin:0!important;
  padding:0!important;
  color:rgba(255,255,255,.94)!important;
  -webkit-text-fill-color:rgba(255,255,255,.94)!important;
  background:none!important;
  font-size:11.8px!important;
  line-height:1.05!important;
  letter-spacing:-.02em!important;
  font-weight:810!important;
  text-shadow:0 5px 18px rgba(0,0,0,.58)!important;
}

body.bunn-v1012-mood .v1012-bubble::after{
  display:block;
  width:118px;
  min-height:18px;
  margin:0;
  color:rgba(255,255,255,.45);
  font-size:8.7px;
  line-height:1.07;
  font-weight:650;
  letter-spacing:-.006em;
  text-shadow:0 4px 15px rgba(0,0,0,.52);
}

/* Individual emotional atmospheres. No emoji; behavior carries the meaning. */
body.bunn-v1012-mood .v1012-bubble[data-mood="tired"]{--mood-a:113,129,235;--mood-b:159,116,220}
body.bunn-v1012-mood .v1012-bubble[data-mood="tired"]::after{content:"Biraz nefes iyi gelebilir."}
body.bunn-v1012-mood .v1012-bubble[data-mood="tired"]>span{animation-duration:8.7s}

body.bunn-v1012-mood .v1012-bubble[data-mood="tense"]{--mood-a:220,101,128;--mood-b:136,92,218}
body.bunn-v1012-mood .v1012-bubble[data-mood="tense"]::after{content:"Ortamı değiştirelim."}
body.bunn-v1012-mood .v1012-bubble[data-mood="tense"]>span::before{animation-duration:4.7s}

body.bunn-v1012-mood .v1012-bubble[data-mood="happy"]{--mood-a:245,164,86;--mood-b:229,91,157}
body.bunn-v1012-mood .v1012-bubble[data-mood="happy"]::after{content:"Bu enerjiyi paylaş."}
body.bunn-v1012-mood .v1012-bubble[data-mood="happy"]>span{
  background:
    radial-gradient(circle at 31% 24%,rgba(255,255,255,.95) 0 5%,rgba(255,255,255,.26) 9%,transparent 25%),
    radial-gradient(circle at 71% 68%,rgba(238,104,175,.57),transparent 46%),
    radial-gradient(circle at 29% 74%,rgba(255,184,88,.68),transparent 54%),
    linear-gradient(145deg,rgba(255,183,91,.82),rgba(232,92,163,.67))!important;
}

body.bunn-v1012-mood .v1012-bubble[data-mood="energy"]{--mood-a:87,112,235;--mood-b:71,186,218}
body.bunn-v1012-mood .v1012-bubble[data-mood="energy"]::after{content:"Bugün bu enerji evde kalmasın."}
body.bunn-v1012-mood .v1012-bubble[data-mood="energy"]>span{animation-duration:5.5s}
body.bunn-v1012-mood .v1012-bubble[data-mood="energy"]>span::before{animation-duration:3.8s}

body.bunn-v1012-mood .v1012-bubble[data-mood="normal"]{--mood-a:139,108,222;--mood-b:188,111,188}
body.bunn-v1012-mood .v1012-bubble[data-mood="normal"]::after{content:"Ufak bir bahane yeter."}

body.bunn-v1012-mood .v1012-bubble[data-mood="bored"]{--mood-a:177,89,221;--mood-b:224,101,145}
body.bunn-v1012-mood .v1012-bubble[data-mood="bored"]::after{content:"Yeni bir ihtimal görelim."}
body.bunn-v1012-mood .v1012-bubble[data-mood="bored"]>span::after{animation-duration:4.6s}

body.bunn-v1012-mood .v1012-bubble[data-mood="full"]{--mood-a:92,115,210;--mood-b:137,94,205}
body.bunn-v1012-mood .v1012-bubble[data-mood="full"]::after{content:"Biraz uzaklaşmak iyi gelebilir."}
body.bunn-v1012-mood .v1012-bubble[data-mood="full"]>span{
  filter:saturate(.92) brightness(.96);
  animation-duration:9.2s;
}

body.bunn-v1012-mood .v1012-bubble[data-mood="social"]{--mood-a:214,91,143;--mood-b:104,101,229}
body.bunn-v1012-mood .v1012-bubble[data-mood="social"]::after{content:"Birilerini dürtmenin zamanı."}
body.bunn-v1012-mood .v1012-bubble[data-mood="social"]>span{
  background:
    radial-gradient(circle at 31% 29%,rgba(255,255,255,.86) 0 5%,transparent 13%),
    radial-gradient(circle at 67% 37%,rgba(255,255,255,.38) 0 5%,transparent 14%),
    radial-gradient(circle at 52% 70%,rgba(255,255,255,.24) 0 4%,transparent 13%),
    radial-gradient(circle at 28% 72%,rgba(221,90,154,.66),transparent 47%),
    linear-gradient(145deg,rgba(221,92,155,.75),rgba(105,101,231,.69))!important;
}

/* Retain organic orbit placement from the accepted behavior, but make motion calmer. */
body.bunn-v1012-mood .v1012-bubble-float:nth-child(1){--dur:11.7s}
body.bunn-v1012-mood .v1012-bubble-float:nth-child(2){--dur:12.8s}
body.bunn-v1012-mood .v1012-bubble-float:nth-child(3){--dur:11.2s}
body.bunn-v1012-mood .v1012-bubble-float:nth-child(4){--dur:12.5s}
body.bunn-v1012-mood .v1012-bubble-float:nth-child(5){--dur:13.1s}
body.bunn-v1012-mood .v1012-bubble-float:nth-child(6){--dur:11.9s}
body.bunn-v1012-mood .v1012-bubble-float:nth-child(7){--dur:13.4s}
body.bunn-v1012-mood .v1012-bubble-float:nth-child(8){--dur:12.2s}

/* Touch: physical, restrained. Existing JS remains the source of truth for selection. */
body.bunn-v1012-mood .v1012-bubble:active>span{
  transform:scale(.94)!important;
  filter:saturate(1.12) brightness(1.08);
}
body.bunn-v1012-mood .v1012-bubble.is-selected{
  transform:none!important;
  filter:none!important;
  box-shadow:none!important;
}
body.bunn-v1012-mood .v1012-bubble.is-selected>span{
  transform:scale(1.12)!important;
  filter:saturate(1.20) brightness(1.14);
  border-color:rgba(255,255,255,.37)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.30),
    0 0 0 1px rgba(255,255,255,.08),
    0 0 34px rgba(var(--mood-a),.45),
    0 18px 38px rgba(0,0,0,.28)!important;
}
body.bunn-v1012-mood .v1012-bubble[disabled]:not(.is-selected){
  opacity:.42!important;
  filter:saturate(.66) brightness(.78)!important;
}
body.bunn-v1012-mood .v1012-bubble[disabled]:not(.is-selected)>span{
  transform:scale(.93);
}

/* Question / voice copy: same timing, premium visual transition only. */
body.bunn-v1012-mood .v1012-question{
  left:20px;
  right:20px;
  top:83%;
  z-index:20;
  gap:6px;
}
body.bunn-v1012-mood .v1012-question small{
  font-size:9.5px!important;
  line-height:1!important;
  letter-spacing:.20em!important;
  color:rgba(255,255,255,.36)!important;
}
body.bunn-v1012-mood .v1012-question h1{
  max-width:390px;
  font-size:clamp(25px,7vw,34px)!important;
  line-height:1.01!important;
  letter-spacing:-.047em!important;
  font-weight:800!important;
  text-wrap:balance;
}
body.bunn-v1012-mood #v1012MoodHint{
  max-width:330px;
  font-size:12.5px!important;
  line-height:1.28!important;
  color:rgba(255,255,255,.50)!important;
  letter-spacing:-.012em;
}
body.bunn-v1012-mood #v1012Question.v1021-copy-swap{
  animation:v1021CopySwap .34s cubic-bezier(.22,.9,.26,1) both;
}

/* City line is injected by the visual enhancer and writes to the same canonical city state. */
body.bunn-v1012-mood .v1021-mood-city{
  pointer-events:auto!important;
  appearance:none;
  -webkit-appearance:none;
  margin:3px 0 0!important;
  padding:6px 10px!important;
  border:1px solid rgba(255,255,255,.085)!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  color:rgba(255,255,255,.72)!important;
  -webkit-text-fill-color:rgba(255,255,255,.72)!important;
  background:rgba(255,255,255,.035)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.055)!important;
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  font:700 10.5px/1.1 inherit!important;
  letter-spacing:.005em!important;
  transition:transform .16s ease,background .16s ease,border-color .16s ease!important;
}
body.bunn-v1012-mood .v1021-mood-city::before{
  content:"✦";
  color:rgba(189,154,255,.90);
  font-size:9px;
}
body.bunn-v1012-mood .v1021-mood-city i{
  font-style:normal;
  color:rgba(255,255,255,.34);
  font-size:9px;
  font-weight:700;
}
body.bunn-v1012-mood .v1021-mood-city:active{
  transform:scale(.97)!important;
  background:rgba(255,255,255,.07)!important;
  border-color:rgba(255,255,255,.14)!important;
}

/* City picker: visually local to Mood, state remains the existing Bunn city state. */
body.bunn-v1012-mood .v1021-city-backdrop{
  position:fixed;
  inset:0;
  z-index:2147483600;
  display:grid;
  align-items:end;
  padding:18px max(14px,env(safe-area-inset-right)) max(14px,var(--b3a-safe-bottom)) max(14px,env(safe-area-inset-left));
  background:rgba(3,2,7,.54);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  animation:v1021CityFade .18s ease both;
}
body.bunn-v1012-mood .v1021-city-sheet{
  width:min(100%,430px);
  max-height:min(68dvh,560px);
  margin:0 auto;
  overflow:auto;
  overscroll-behavior:contain;
  border:1px solid rgba(255,255,255,.12);
  border-radius:28px;
  padding:16px;
  background:
    radial-gradient(circle at 20% 0,rgba(132,91,255,.15),transparent 42%),
    rgba(13,8,21,.92);
  box-shadow:0 30px 90px rgba(0,0,0,.54),inset 0 1px rgba(255,255,255,.08);
}
body.bunn-v1012-mood .v1021-city-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:2px 2px 12px;
}
body.bunn-v1012-mood .v1021-city-head strong{
  font-size:16px;
  letter-spacing:-.025em;
}
body.bunn-v1012-mood .v1021-city-close{
  width:36px;
  height:36px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#fff;
  background:rgba(255,255,255,.05);
  font-size:18px;
}
body.bunn-v1012-mood .v1021-city-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
body.bunn-v1012-mood .v1021-city-choice{
  min-height:48px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.085);
  border-radius:16px;
  color:rgba(255,255,255,.82);
  background:rgba(255,255,255,.04);
  text-align:left;
  font:750 13px/1.15 inherit;
}
body.bunn-v1012-mood .v1021-city-choice.is-active{
  border-color:rgba(190,157,255,.32);
  background:linear-gradient(135deg,rgba(142,103,241,.18),rgba(208,100,181,.09));
  color:#fff;
}

/* Closing: choice is absorbed by the core, then the accepted closing copy proceeds. */
body.bunn-v1012-mood .v1012-mood.is-closing .v1012-bubble-float{
  opacity:0!important;
  filter:blur(10px)!important;
  transform:translate(-50%,-50%) scale(.92)!important;
  transition:opacity .32s ease,filter .32s ease,transform .32s ease!important;
}
body.bunn-v1012-mood .v1012-mood.is-closing .v1012-orb-wrap{top:37%}
body.bunn-v1012-mood .v1012-mood.is-closing .v1012-orb{
  filter:saturate(1.16) brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08),
    0 0 70px rgba(184,122,255,.55),
    0 0 154px rgba(128,76,255,.34),
    0 34px 96px rgba(0,0,0,.48);
}
body.bunn-v1012-mood .v1012-mood.is-closing .v1012-question{
  top:61%;
  gap:9px;
}
body.bunn-v1012-mood .v1012-mood.is-closing .v1021-mood-city{display:none!important}

/* Existing skip stays quiet, not a competing CTA. */
body.bunn-v1012-mood .v10122-skip{
  width:48px;
  height:48px;
  right:max(15px,calc(env(safe-area-inset-right) + 12px));
  bottom:max(13px,calc(var(--b3a-safe-bottom) + 10px));
  border-color:rgba(255,255,255,.11);
  background:rgba(255,255,255,.045);
  color:rgba(255,255,255,.76)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.23),inset 0 1px rgba(255,255,255,.07);
}

/* Motion language */
@keyframes v1021MoodBody{
  0%,100%{transform:translate3d(0,0,0) scale(.985) rotate(-1.2deg);border-radius:48% 52% 55% 45%/52% 44% 56% 48%}
  48%{transform:translate3d(1px,-2px,0) scale(1.035) rotate(1deg);border-radius:55% 45% 48% 52%/46% 57% 43% 54%}
}
@keyframes v1021MoodMembrane{
  0%,100%{transform:rotate(-7deg) scale(.96);opacity:.68}
  50%{transform:rotate(11deg) scale(.84);opacity:.90}
}
@keyframes v1021MoodParticles{
  0%,100%{transform:translate3d(0,0,0);opacity:.54}
  50%{transform:translate3d(5px,-7px,0);opacity:.78}
}
@keyframes v1021CopySwap{
  0%{opacity:.10;filter:blur(5px);transform:translateY(3px)}
  100%{opacity:1;filter:blur(0);transform:translateY(0)}
}
@keyframes v1021CityFade{
  from{opacity:0}
  to{opacity:1}
}

/* Small/short devices: preserve safe areas and keep labels readable. */
@media(max-width:390px){
  body.bunn-v1012-mood .v1012-orb{width:142px;height:142px}
  body.bunn-v1012-mood .v1012-bubble-float{width:108px!important;height:94px!important}
  body.bunn-v1012-mood .v1012-bubble{width:108px!important;height:94px!important}
  body.bunn-v1012-mood .v1012-bubble>span{width:52px!important;height:52px!important}
  body.bunn-v1012-mood .v1012-bubble b{width:106px!important;max-width:106px!important;font-size:10.9px!important}
  body.bunn-v1012-mood .v1012-bubble::after{width:106px;font-size:8.1px}
  body.bunn-v1012-mood .v1012-question{left:14px;right:14px}
}
@media(max-height:720px){
  body.bunn-v1012-mood .v1012-orbit-stage{inset:max(45px,calc(var(--v10128-safe-top) + 20px)) 0 max(102px,calc(var(--b3a-safe-bottom) + 86px))}
  body.bunn-v1012-mood .v1012-orb{width:128px;height:128px}
  body.bunn-v1012-mood .v1012-orb-wrap{top:39%}
  body.bunn-v1012-mood .v1012-bubble-float{width:98px!important;height:86px!important}
  body.bunn-v1012-mood .v1012-bubble{width:98px!important;height:86px!important}
  body.bunn-v1012-mood .v1012-bubble>span{width:46px!important;height:46px!important}
  body.bunn-v1012-mood .v1012-bubble b{width:96px!important;max-width:96px!important;font-size:10.1px!important}
  body.bunn-v1012-mood .v1012-bubble::after{display:none}
  body.bunn-v1012-mood .v1012-question{top:82%;gap:4px}
  body.bunn-v1012-mood .v1012-question h1{font-size:clamp(22px,6.4vw,30px)!important}
  body.bunn-v1012-mood #v1012MoodHint{font-size:11.5px!important}
}
@media(max-height:650px){
  body.bunn-v1012-mood .v1012-bubble b{display:none!important}
  body.bunn-v1012-mood .v1012-question{top:80%}
}
@media(prefers-reduced-motion:reduce){
  body.bunn-v1012-mood .v1012-mood::before,
  body.bunn-v1012-mood .v10122-stars,
  body.bunn-v1012-mood .v1012-bubble-float,
  body.bunn-v1012-mood .v1012-bubble>span,
  body.bunn-v1012-mood .v1012-bubble>span::before,
  body.bunn-v1012-mood .v1012-bubble>span::after{
    animation:none!important;
  }
  body.bunn-v1012-mood #v1012Question.v1021-copy-swap{animation-duration:.01ms!important}
}
