/* ── AI Pommai — Thinking Cloud Assistant ── */

/* Main container — no shape, just positioning */
#ai {
  position: fixed;
  top: 50%;
  margin-top: -42px;
  right: 24px;
  width: 110px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
  filter: drop-shadow(0 4px 18px rgba(255, 106, 0, 0.4));
  transition: filter 0.3s ease;
  max-width: calc(100vw - 30px);
}

#ai:hover {
  filter: drop-shadow(0 4px 24px rgba(255, 106, 0, 0.6));
}

/* ── SVG Cloud Background ── */
#ai .cloud-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#ai .cloud-svg path {
  fill: url(#cloudGrad);
}

/* ── Thought Trail Dots ── */
.thought-dot {
  position: fixed;
  background: radial-gradient(circle at 35% 35%, #ff9a44, #ff6a00);
  border-radius: 50%;
  z-index: 9998;
  filter: drop-shadow(0 0 6px rgba(255, 106, 0, 0.3));
}

.thought-dot.dot-1 { width: 16px; height: 16px; right: 36px; }
.thought-dot.dot-2 { width: 10px; height: 10px; right: 28px; }
.thought-dot.dot-3 { width: 6px;  height: 6px;  right: 22px; }

/* ── Speech Bubble ── */
#bubble {
  position: fixed;
  top: 50%;
  margin-top: -95px;
  right: 24px;
  background: #fff;
  color: #333;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: 0.3s;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

#bubble::before {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
}

/* ── Face ── */
.face {
  position: relative;
  width: 38px;
  height: 32px;
  z-index: 2;
}

/* ── Eyes — realistic with pupil ── */
.eye {
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  transition: all 0.2s;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.eye::before {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  background: radial-gradient(circle at 40% 35%, #2d1b00, #000);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.15s ease-out;
}

.eye::after {
  content: '';
  position: absolute;
  width: 2.5px;
  height: 2.5px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 8px;
  z-index: 1;
}

.eye.left  { left: 2px;  top: 4px; }
.eye.right { right: 2px; top: 4px; }

/* Blink */
.blink { height: 2px !important; overflow: hidden; }

/* Sleepy */
.sleepy { height: 5px !important; overflow: hidden; }

/* ── Mouth ── */
.mouth {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s;
}

.smile {
  width: 14px;
  height: 6px;
  border: 2px solid #fff;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

.surprise {
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.happy {
  transform: translateX(-50%) scale(1.2);
}

/* ── Mascot Mobile Responsive ── */
@media (max-width: 768px) {
  #ai {
    right: 6px;
    width: 70px;
    height: 55px;
  }

  #bubble {
    right: 6px;
    font-size: 11px;
    max-width: 170px;
    padding: 6px 10px;
    margin-top: -75px;
  }

  .thought-dot.dot-1 { width: 10px; height: 10px; right: 14px; }
  .thought-dot.dot-2 { width: 7px; height: 7px; right: 10px; }
  .thought-dot.dot-3 { width: 4px; height: 4px; right: 8px; }

  .face { width: 28px; height: 24px; }
  .eye { width: 9px; height: 9px; }
  .eye::before { width: 5px; height: 5px; }
  .eye::after { width: 2px; height: 2px; }
}

@media (max-width: 480px) {
  #ai {
    right: 4px;
    width: 60px;
    height: 48px;
    margin-top: -24px;
  }

  #bubble {
    right: 4px;
    max-width: 150px;
    font-size: 10px;
  }

  .thought-dot.dot-1 { width: 8px; height: 8px; right: 10px; }
  .thought-dot.dot-2 { width: 5px; height: 5px; right: 8px; }
  .thought-dot.dot-3 { width: 3px; height: 3px; right: 6px; }
}
