@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@400;600&family=Mulish:wght@400;500&display=swap');

:root { --fs: 1rem; }
html:has(body.theme-casacollege) { font-size: var(--fs, 1rem); }

body.theme-casacollege {
  font-family: 'Mulish', system-ui, sans-serif;
  background: #ffffff;
  color: #1A2142;
}

body.theme-casacollege.dyslexic { font-family: 'OpenDyslexic', sans-serif !important; }
body.theme-casacollege.dyslexic * { font-family: 'OpenDyslexic', sans-serif !important; }

body.theme-casacollege {
  --bg: #ffffff;
  --bg2: #f8f8f6;
  --bg3: #f0ede4;
  --text: #1A2142;
  --muted: #7A7A7A;
  --accent: #B9376D;
  --border: rgba(26,33,66,0.12);
  --amber: #B9376D;
}

/* Header */
body.theme-casacollege .logo { display: none !important; }
body.theme-casacollege header {
  background: #ffffff;
  border-bottom: 1.5px solid rgba(26,33,66,0.1);
}
#casa-logo { height: 48px; width: auto; display: block; }
#casa-font-controls {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #7A7A7A; margin-left: auto;
}

/* Chat background */
body.theme-casacollege #chat {
  background: #ffffff;
  position: relative;
  overflow-y: auto;
}

/* Avatar background image */
#avatar-bg {
  position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60%; max-width: 340px;
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s;
}

@media (max-width: 767px) {
  #avatar-bg { opacity: 0.07; width: 80%; }
}

/* Avatar panel on desktop */
@media (min-width: 768px) {
  body.theme-casacollege .avatar-panel {
    background: transparent;
    border-right: none;
    position: relative;
  }
  body.theme-casacollege .avatar-panel .avatar-wrap {
    position: relative; z-index: 1;
  }
}

/* Message bubbles — user */
body.theme-casacollege .msg.user .msg-bubble {
  background: #B9376D;
  color: #fff;
  border-radius: 8px 8px 2px 8px;
}

/* Message bubbles — assistant */
body.theme-casacollege .msg.assistant .msg-bubble {
  background: #F0F3FF;
  border: 1.5px solid rgba(26,33,66,0.15);
  color: #1A2142;
  padding: 14px 18px;
}

/* Leaf-shaped bubbles — desktop only */
@media (min-width: 768px) {
  body.theme-casacollege .msg.assistant .msg-bubble.leaf-1 {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  body.theme-casacollege .msg.assistant .msg-bubble.leaf-2 {
    border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
  }
  body.theme-casacollege .msg.assistant .msg-bubble.leaf-3 {
    border-radius: 20% 80% 60% 40% / 60% 30% 70% 40%;
  }
  body.theme-casacollege .msg.assistant .msg-bubble.leaf-4 {
    border-radius: 50% 50% 80% 20% / 40% 60% 40% 60%;
  }
  body.theme-casacollege .msg.assistant .msg-bubble.leaf-5 {
    border-radius: 40% 60% 40% 60% / 60% 40% 60% 40%;
  }
}

/* Reset leaf on mobile */
@media (max-width: 767px) {
  body.theme-casacollege .msg.assistant .msg-bubble {
    border-radius: 8px;
  }
  .msg-bubble { font-size: 1.05rem; line-height: 1.65; }
}

/* Suggestions */
body.theme-casacollege .suggestion {
  background: #F0F3FF;
  border: 1px solid rgba(185,55,109,0.3);
  color: #1A2142;
  border-radius: 20px;
}
body.theme-casacollege .suggestion:hover {
  background: #B9376D;
  color: #fff;
}

/* Send button */
body.theme-casacollege #send-btn { background: #B9376D; color: #fff; }
body.theme-casacollege #send-btn:hover { background: #9d2d5a; }

/* Logo/heading font */
body.theme-casacollege h1,
body.theme-casacollege h2,
body.theme-casacollege h3,
body.theme-casacollege #avatar-name {
  font-family: 'Bitter', serif;
}
