/* ======================================================
💎 BOTLY CHAT THEME: Luxury Atelier
Scope:
  - Widget: .botly-widget.botly-theme-luxury-atelier
  - Bubble: #botly-bubble.botly-theme-luxury-atelier
Aesthetic:
  - Deep charcoal, champagne gold accents, soft luxe gloss
  - Editorial spacing, gentle grain, refined contrast
  - Fully variable-driven (mascot recolors via CSS vars)
====================================================== */

/* ======================================================
1) THEME VARIABLES (WIDGET + BUBBLE)
====================================================== */
.botly-widget.botly-theme-luxury-atelier,
.botly-bubble.botly-theme-luxury-atelier {
  /* Palette */
  --botly-color-primary:         #121216;                /* near-black */
  --botly-color-primary-600:     #18181d;                /* header depth */
  --botly-color-accent:          #d4af37;                /* champagne gold */
  --botly-color-accent-2:        #c6972e;                /* warmer gold */
  --botly-color-bg:              #0c0c10;
  --botly-color-surface:         rgba(20, 20, 25, 0.88); /* smoked glass */
  --botly-color-muted:           #9aa0a6;                /* cool gray */

  --botly-color-bot-bubble:      #16161b;                /* charcoal */
  --botly-color-user-bubble:     #1f1f26;                /* richer charcoal */
  --botly-color-text:            #f5f3ef;                /* antique white */
  --botly-color-border:          rgba(212,175,55,0.22);  /* gold hairline */

  --botly-success:               #86efac;

  /* Type */
  --botly-font-family:           "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
                                  Roboto, "Helvetica Neue", Arial;
  --botly-font-display:          "Playfair Display", Georgia, "Times New Roman", Times, serif;

  /* Radii & shadows */
  --botly-radius-sm:             12px;
  --botly-radius-md:             16px;
  --botly-radius-lg:             20px;

  --botly-shadow-sm:             0 8px 18px rgba(0,0,0,.35);
  --botly-shadow-md:             0 14px 28px rgba(0,0,0,.48);
  --botly-shadow-lg:             0 24px 56px rgba(0,0,0,.6);

  /* Launcher bubble */
  --bubble-size:                 66px;
  --bubble-ring:                 rgba(212,175,55,.35);
  --bubble-glow:                 rgba(212,175,55,.28);
  --bubble-bg-start:             #1b1b22;
  --bubble-bg-end:               #0f0f14;

  /* Tooltip */
  --tooltip-bg:                  rgba(10, 10, 12, 0.96);
  --tooltip-border:              rgba(212,175,55,.28);
  --tooltip-color:               #f7f4ee;

  /* Presence */
  --presence-color:              #34d399;
  --presence-ring:               #0f0f14;

  /* Confetti (muted luxe) */
  --confetti-1:                  #d4af37;
  --confetti-2:                  #a78bfa;
  --confetti-3:                  #60a5fa;
  --confetti-4:                  #f59e0b;

  /* Mascot (inline SVG) */
  --botly-mascot-grad-start:     #2a2a33;
  --botly-mascot-grad-end:       #0f0f14;
  --botly-mascot-visor:          #fff8e7;
  --botly-mascot-visor-opacity:  0.92;
  --botly-mascot-eye:            #09090c;
  --botly-mascot-sparkle:        #d4af37;
  --botly-mascot-sparkle-opacity:.9;
  --botly-mascot-smile:          #d4af37;

  /* Mascot effects */
  --mascot-glow:                 0 0 18px rgba(212,175,55,.25);
  --mascot-eye-wink-scale:       .25;
  --mascot-eye-wink-duration:    .35s;

  /* Mobile safety */
  --max-inline-size:             100%;
}

/* ======================================================
2) BUBBLE / LAUNCHER
====================================================== */
#botly-bubble.botly-theme-luxury-atelier { width: var(--bubble-size); height: var(--bubble-size); }

#botly-bubble.botly-theme-luxury-atelier .botly-sticker {
  background:
    radial-gradient(120% 120% at 20% 20%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(135deg, var(--bubble-bg-start), var(--bubble-bg-end));
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.06),
    0 14px 32px rgba(0,0,0,.55),
    0 0 24px var(--bubble-glow);
}

#botly-bubble.botly-theme-luxury-atelier::after {
  content: "";
  position: absolute; inset: -8px;
  border-radius: 50%;
  background: radial-gradient(70% 70% at 50% 40%, var(--bubble-glow), transparent 70%);
  filter: blur(10px);
  opacity: .9; pointer-events: none;
}

#botly-bubble.botly-theme-luxury-atelier .botly-tooltip {
  background: var(--tooltip-bg);
  border: 1px solid var(--tooltip-border);
  color: var(--tooltip-color);
  box-shadow: var(--botly-shadow-sm);
}

#botly-bubble.botly-theme-luxury-atelier .botly-presence {
  background: var(--presence-color);
  box-shadow: 0 0 0 2px var(--presence-ring);
}

#botly-bubble.botly-theme-luxury-atelier .botly-face { filter: drop-shadow(var(--mascot-glow)); }
#botly-bubble.botly-theme-luxury-atelier:hover .botly-sticker { transform: translateY(-1px) scale(1.03); }
#botly-bubble.botly-theme-luxury-atelier:active .botly-sticker { transform: none; }

#botly-bubble.botly-theme-luxury-atelier .botly-confetti i:nth-child(1){ background: var(--confetti-1); }
#botly-bubble.botly-theme-luxury-atelier .botly-confetti i:nth-child(2){ background: var(--confetti-2); }
#botly-bubble.botly-theme-luxury-atelier .botly-confetti i:nth-child(3){ background: var(--confetti-3); }
#botly-bubble.botly-theme-luxury-atelier .botly-confetti i:nth-child(4){ background: var(--confetti-4); }
#botly-bubble.botly-theme-luxury-atelier .botly-confetti i:nth-child(5){ background: var(--confetti-2); }
#botly-bubble.botly-theme-luxury-atelier .botly-confetti i:nth-child(6){ background: var(--confetti-1); }

/* Hover wink */
#botly-bubble.botly-theme-luxury-atelier:hover .botly-face .eyes .eye {
  transform-origin: center;
  animation: luxe-wink var(--mascot-eye-wink-duration) ease-in-out 1;
}
@keyframes luxe-wink {
  0% { transform: scaleY(1); }
  45% { transform: scaleY(var(--mascot-eye-wink-scale)); }
  100% { transform: scaleY(1); }
}

/* ======================================================
3) WIDGET SHELL + SURFACES
====================================================== */
.botly-widget.botly-theme-luxury-atelier {
  background: var(--botly-color-surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--botly-color-border);
  border-radius: var(--botly-radius-lg);
  box-shadow: var(--botly-shadow-lg);
  color: var(--botly-color-text);
  font-family: var(--botly-font-family);
  position: relative;
}

/* Subtle grain + vignette */
.botly-widget.botly-theme-luxury-atelier::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(100% 80% at 10% 10%, rgba(212,175,55,.08), transparent 60%),
    radial-gradient(90% 70% at 90% 10%, rgba(212,175,55,.06), transparent 60%);
  pointer-events: none;
}

/* Header */
.botly-widget.botly-theme-luxury-atelier .botly-header {
  display: none;
  background:
    linear-gradient(135deg, #1c1c22, #0f0f14 60%),
    linear-gradient(0deg, rgba(212,175,55,.08), rgba(212,175,55,.08));
  color: #f5f3ef;
  border-bottom: 1px solid rgba(212,175,55,.18);
}
.botly-widget.botly-theme-luxury-atelier #botly-name {
  font-family: var(--botly-font-display);
  font-weight: 800;
  letter-spacing: .3px;
}

/* Minimize */
.botly-widget.botly-theme-luxury-atelier .botly-minimize {
  background: rgba(255,255,255,.06);
  color: #f5f3ef;
}
.botly-widget.botly-theme-luxury-atelier .botly-minimize:hover {
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.08);
}

/* Messages area */
.botly-widget.botly-theme-luxury-atelier .botly-messages {
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(212,175,55,.06), transparent 40%),
    #0e0e12;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

/* Keep content inside on mobile */
.botly-widget.botly-theme-luxury-atelier .botly-bubble-text,
.botly-widget.botly-theme-luxury-atelier .booking-card,
.botly-widget.botly-theme-luxury-atelier .botly-inline-form {
  max-inline-size: var(--max-inline-size);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Bot bubble */
.botly-widget.botly-theme-luxury-atelier .botly-message-bot .botly-bubble-text {
  background:
    linear-gradient(180deg, rgba(212,175,55,.06), rgba(255,255,255,0)),
    var(--botly-color-bot-bubble);
  color: var(--botly-color-text);
  border-radius: 16px 16px 16px 6px;
  border: 1px solid rgba(212,175,55,.20);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), var(--botly-shadow-sm);
}

/* User bubble */
.botly-widget.botly-theme-luxury-atelier .botly-message-user .botly-bubble-text {
  background:
    linear-gradient(135deg, #2a2a33, #1c1c24),
    linear-gradient(0deg, rgba(212,175,55,.10), rgba(212,175,55,.10));
  color: #f8f6f2;
  border-radius: 16px 16px 6px 16px;
  border: 1px solid rgba(212,175,55,.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 8px 18px rgba(0,0,0,.35);
}

/* Bubble tails */
.botly-widget.botly-theme-luxury-atelier .botly-message-bot .botly-bubble-text::before {
  content: ""; position: absolute; bottom: 0; left: -6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--botly-color-bot-bubble);
  box-shadow: 0 0 0 1px rgba(212,175,55,.20);
}
.botly-widget.botly-theme-luxury-atelier .botly-message-user .botly-bubble-text::before {
  content: ""; position: absolute; bottom: 0; right: -6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #262631;
  box-shadow: 0 0 0 1px rgba(212,175,55,.35);
}

/* Typing dots */
.botly-widget.botly-theme-luxury-atelier .botly-typing .dot {
  background: #e5c766;
  box-shadow: 0 0 8px rgba(212,175,55,.45);
}

/* Quick replies */
.botly-widget.botly-theme-luxury-atelier .botly-quick-replies { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.botly-widget.botly-theme-luxury-atelier .botly-quick-replies button {
  background: #15151b;
  color: #f5f3ef;
  border: 1px solid rgba(212,175,55,.28);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}
.botly-widget.botly-theme-luxury-atelier .botly-quick-replies button:hover {
  background: linear-gradient(135deg, #1f1f27, #15151b);
  border-color: rgba(212,175,55,.45);
  box-shadow: 0 6px 16px rgba(0,0,0,.45), 0 0 20px rgba(212,175,55,.22);
}

/* Composer */
.botly-widget.botly-theme-luxury-atelier .botly-input {
  background:
    linear-gradient(#141419, #141419) padding-box,
    linear-gradient(90deg, rgba(212,175,55,.22), rgba(212,175,55,.08)) border-box;
  border-top: 1px solid rgba(212,175,55,.18);
}
.botly-widget.botly-theme-luxury-atelier .botly-input input {
  color: #f5f3ef;
  background: #0f0f14;
  border: 1px solid rgba(212,175,55,.18);
}
.botly-widget.botly-theme-luxury-atelier .botly-input input::placeholder { color: rgba(245,243,239,.50); }
.botly-widget.botly-theme-luxury-atelier .botly-input input:focus {
  border-color: rgba(212,175,55,.55);
  box-shadow: 0 0 0 4px rgba(212,175,55,.14);
}
.botly-widget.botly-theme-luxury-atelier .botly-input button {
  background:
    linear-gradient(135deg, #2a2a33, #15151b) padding-box,
    radial-gradient(120% 120% at 20% 20%, rgba(212,175,55,.20), rgba(212,175,55,.06)) border-box;
  border: 1px solid rgba(212,175,55,.35);
  color: #f5f3ef;
  box-shadow: 0 8px 20px rgba(0,0,0,.55), 0 0 16px rgba(212,175,55,.22);
}
.botly-widget.botly-theme-luxury-atelier .botly-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,.6), 0 0 28px rgba(212,175,55,.26);
}

/* Footer */
.botly-widget.botly-theme-luxury-atelier .botly-footer {
  background: #101015;
  border-top: 1px solid rgba(212,175,55,.18);
  color: #c9c6bd;
}
.botly-widget.botly-theme-luxury-atelier .botly-footer a { color: var(--botly-color-accent); }

/* Cover page */
.botly-widget.botly-theme-luxury-atelier .botly-cover {
  background:
    radial-gradient(100% 80% at 10% 10%, rgba(212,175,55,.12), transparent 60%),
    radial-gradient(90% 70% at 90% 10%, rgba(167,139,250,.10), transparent 60%),
    linear-gradient(135deg, #121217, #0f0f14 55%, #0b0b10);
}
.botly-widget.botly-theme-luxury-atelier .cover-title {
  color: #f5f3ef; text-shadow: 0 0 12px rgba(212,175,55,.18);
  font-family: var(--botly-font-display);
  font-weight: 900;
  letter-spacing: .2px;
}
.botly-widget.botly-theme-luxury-atelier .cover-subtitle { color: rgba(245,243,239,.82); }
.botly-widget.botly-theme-luxury-atelier .btn-premium {
  background: linear-gradient(135deg, #2a2a33, #15151b);
  border: 1px solid rgba(212,175,55,.38);
  color: #f5f3ef;
  box-shadow: 0 10px 24px rgba(0,0,0,.45), 0 0 24px rgba(212,175,55,.20);
  font-weight: 800;
}
.botly-widget.botly-theme-luxury-atelier .btn-secondary {
  color: #f5f3ef;
  background: transparent;
  border: 2px solid rgba(212,175,55,.55);
}
.botly-widget.botly-theme-luxury-atelier .cover-subscribe {
  background: rgba(16,16,21,.5);
  border: 1px solid rgba(212,175,55,.25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.botly-widget.botly-theme-luxury-atelier .cover-subscribe input { color: #f5f3ef; }
.botly-widget.botly-theme-luxury-atelier .cover-subscribe input::placeholder { color: rgba(245,243,239,.55); }
.botly-widget.botly-theme-luxury-atelier .cover-subscribe button {
  background: linear-gradient(135deg, var(--botly-color-accent), var(--botly-color-accent-2));
  color: #0b0b10;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0,0,0,.5), 0 0 18px rgba(212,175,55,.28);
}

/* Inline booking form */
.botly-widget.botly-theme-luxury-atelier .botly-inline-form input[type="text"],
.botly-widget.botly-theme-luxury-atelier .botly-inline-form input[type="email"],
.botly-widget.botly-theme-luxury-atelier .botly-inline-form input[type="tel"] {
  background: #0f0f14;
  color: #f5f3ef;
  border: 1px solid rgba(212,175,55,.22);
}
.botly-widget.botly-theme-luxury-atelier .botly-inline-form input::placeholder { color: rgba(245,243,239,.50); }
.botly-widget.botly-theme-luxury-atelier .botly-inline-form input:focus {
  border-color: rgba(212,175,55,.55);
  box-shadow: 0 0 0 4px rgba(212,175,55,.14);
}
.botly-widget.botly-theme-luxury-atelier .botly-inline-form .btn-primary {
  background: linear-gradient(135deg, #2a2a33, #15151b);
  border: 1px solid rgba(212,175,55,.38);
  color: #f5f3ef;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0,0,0,.5), 0 0 18px rgba(212,175,55,.20);
}

/* Links in messages */
.botly-widget.botly-theme-luxury-atelier .botly-bubble-text a {
  color: #e7c860;
  text-decoration-thickness: 2px;
}
.botly-widget.botly-theme-luxury-atelier .botly-bubble-text a:hover {
  color: #f1d77d;
  text-decoration: underline;
}

/* ======================================================
4) DOM-ORDER FALLBACKS
====================================================== */
.botly-widget.botly-theme-luxury-atelier ~ #botly-bubble .botly-sticker {
  background:
    radial-gradient(120% 120% at 20% 20%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(135deg, var(--bubble-bg-start), var(--bubble-bg-end));
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.06),
    0 14px 32px rgba(0,0,0,.55),
    0 0 24px var(--bubble-glow);
}
.botly-widget.botly-theme-luxury-atelier ~ #botly-bubble::after {
  background: radial-gradient(70% 70% at 50% 40%, var(--bubble-glow), transparent 70%);
}
.botly-widget.botly-theme-luxury-atelier ~ #botly-bubble .botly-tooltip {
  background: var(--tooltip-bg);
  border: 1px solid var(--tooltip-border);
  color: var(--tooltip-color);
  box-shadow: var(--botly-shadow-sm);
}

/* ======================================================
5) ACCESSIBILITY: REDUCE MOTION
====================================================== */
@media (prefers-reduced-motion: reduce) {
  #botly-bubble.botly-theme-luxury-atelier .botly-face .eyes .eye { animation: none !important; }
  #botly-bubble.botly-theme-luxury-atelier .botly-sticker,
  .botly-widget.botly-theme-luxury-atelier .botly-input button { transition: none !important; }
}

/* Luxury Atelier — Light Ivory Variant (panel, messages & cover made lighter) */
.botly-widget.botly-theme-luxury-atelier,
.botly-bubble.botly-theme-luxury-atelier {
  /* swap to light surfaces + dark text */
  --botly-color-surface:         rgba(250, 248, 243, 0.92); /* ivory glass */
  --botly-color-bg:              #f6f2ea;                  /* page tint */
  --botly-color-text:            #1b1b22;                  /* ink */
  --botly-color-bot-bubble:      #ffffff;                  /* white card */
  --botly-color-user-bubble:     #f3ecda;                  /* warm ivory */
  --botly-color-border:          rgba(212,175,55,.25);     /* gold hairline */
}

/* Widget chrome */
.botly-widget.botly-theme-luxury-atelier {
  background:
    radial-gradient(110% 80% at 8% 8%, rgba(212,175,55,.08), transparent 60%),
    radial-gradient(90% 70% at 92% 8%, rgba(212,175,55,.06), transparent 60%),
    var(--botly-color-surface) !important;
  color: var(--botly-color-text) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Header / Footer / Composer to light */
.botly-widget.botly-theme-luxury-atelier .botly-header,
.botly-widget.botly-theme-luxury-atelier .botly-footer,
.botly-widget.botly-theme-luxury-atelier .botly-input {
  background: rgba(255,255,255,.75) !important;
  border-color: rgba(212,175,55,.22) !important;
  color: var(--botly-color-text) !important;
}

/* Messages area */
.botly-widget.botly-theme-luxury-atelier .botly-messages {
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(212,175,55,.08), transparent 40%),
    #faf6ee !important;
}

/* Bubbles on light */
.botly-widget.botly-theme-luxury-atelier .botly-message-bot .botly-bubble-text {
  background: var(--botly-color-bot-bubble) !important;
  color: var(--botly-color-text) !important;
  border: 1px solid rgba(212,175,55,.18) !important;
  box-shadow: 0 6px 14px rgba(27,26,25,.08) !important;
}
.botly-widget.botly-theme-luxury-atelier .botly-message-user .botly-bubble-text {
  background:
    linear-gradient(135deg, #f3ecda, #efe6cd) !important;
  color: #1b1b22 !important;
  border: 1px solid rgba(212,175,55,.28) !important;
  box-shadow: 0 6px 14px rgba(27,26,25,.10) !important;
}

/* Inputs for light mode */
.botly-widget.botly-theme-luxury-atelier .botly-input input {
  background: #ffffff !important;
  color: #1b1b22 !important;
  border: 1px solid rgba(212,175,55,.22) !important;
}
.botly-widget.botly-theme-luxury-atelier .botly-input input::placeholder {
  color: rgba(27,27,34,.55) !important;
}

/* Cover page to ivory */
.botly-widget.botly-theme-luxury-atelier .botly-cover {
  background:
    radial-gradient(100% 80% at 10% 10%, rgba(212,175,55,.14), transparent 60%),
    radial-gradient(90% 70% at 90% 10%, rgba(167,139,250,.10), transparent 60%),
    linear-gradient(135deg, #faf6ee, #f3efe6 55%, #efe8db) !important;
}
.botly-widget.botly-theme-luxury-atelier .cover-title {
  color: #1b1b22 !important;
  text-shadow: 0 1px 0 #fff6, 0 0 12px rgba(212,175,55,.18) !important;
}
.botly-widget.botly-theme-luxury-atelier .cover-subtitle {
  color: rgba(27,27,34,.78) !important;
}

/* Buttons keep luxe vibe on light */
.botly-widget.botly-theme-luxury-atelier .btn-premium {
  background:
    linear-gradient(135deg, #2a2a33, #15151b) padding-box,
    linear-gradient(135deg, #ffe9a7, #d4af37) border-box !important;
  border: 2px solid transparent !important;
  color: #f7f5ef !important;
}
.botly-widget.botly-theme-luxury-atelier .btn-secondary {
  background: transparent !important;
  color: #1b1b22 !important;
  border: 2px solid rgba(212,175,55,.55) !important;
}
