/* Atelje Venček — BlingAI chatbot */
#gcw-chat-bubble {
  position: fixed; bottom: 20px; right: 20px;
  background: linear-gradient(145deg, #1e1714, #2a221e);
  color: #f6eee4; width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; overflow: hidden; white-space: nowrap;
  transition: width .5s ease, border-radius .5s, padding .5s, box-shadow .3s, background .3s;
  border: 1px solid rgba(196,160,106,.5);
  box-shadow: 0 10px 32px rgba(30,23,20,.4), 0 0 0 1px rgba(196,160,106,.2);
  cursor: pointer;
}
#gcw-chat-bubble, #gcw-chat-container, #gcw-chat-container button, #gcw-chat-container input { cursor: pointer; }
body.gcw-open #gcw-chat-container, body.gcw-open #gcw-chat-container * { cursor: auto; }
body.gcw-open #gcw-chat-container button,
body.gcw-open #gcw-chat-container [role="button"] { cursor: pointer; }
#gcw-user-input { cursor: text; }
#gcw-chat-bubble .gcw-bubble-icon { color: #c4a06a; display: flex; flex-shrink: 0; }
#gcw-chat-bubble .gcw-bubble-text {
  max-width: 0; overflow: hidden; margin-left: 0;
  font-family: "Figtree", system-ui, sans-serif; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: #f6eee4;
  transition: max-width .6s ease .1s, margin-left .5s ease .1s;
}
#gcw-chat-bubble:hover, #gcw-chat-bubble.show-text {
  width: 236px; border-radius: 32px; padding: 0 18px; justify-content: flex-start;
  background: linear-gradient(145deg, #2a221e, #6b3342);
}
#gcw-chat-bubble:hover .gcw-bubble-text, #gcw-chat-bubble.show-text .gcw-bubble-text {
  max-width: 180px; margin-left: 10px;
}

#gcw-chat-container {
  position: fixed; bottom: 92px; right: 20px; width: 380px; height: 620px;
  background: linear-gradient(165deg, #fbf6f0 0%, #f6eee4 55%, #f3e8dc 100%);
  border-radius: 22px; box-shadow: 0 20px 55px rgba(30,23,20,.32);
  display: flex; flex-direction: column; z-index: 10000; overflow: hidden;
  border: 1px solid rgba(196,160,106,.35);
  font-family: "Figtree", system-ui, sans-serif; color: #1e1714;
}
@media (max-height: 700px) { #gcw-chat-container { height: 90vh; } }
.gcw-hidden { display: none !important; }

#gcw-chat-header {
  background: linear-gradient(135deg, #1e1714, #2a221e);
  color: #f6eee4; padding: 14px 14px 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(196,160,106,.25);
}
.gcw-header-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.gcw-header-copy strong {
  font-family: "Cormorant Garamond", serif; font-size: 1.2rem; font-weight: 500;
  line-height: 1.15; display: block;
}
.gcw-header-copy span {
  font-family: "Figtree", sans-serif; font-size: .58rem;
  letter-spacing: .16em; text-transform: uppercase; color: #c4a06a;
}
#gcw-close {
  flex-shrink: 0; margin: 0; padding: 0; appearance: none;
  background: rgba(196,160,106,.12); color: #c4a06a; width: 32px; height: 32px;
  border-radius: 50%; display: grid; place-items: center;
  line-height: 0; cursor: pointer; border: 1px solid rgba(196,160,106,.3);
  transition: transform .3s cubic-bezier(.16,1,.3,1), background .3s, color .3s;
}
#gcw-close svg { display: block; }
#gcw-close:hover {
  transform: rotate(90deg) scale(1.06);
  background: rgba(196,160,106,.28); color: #d4b584;
}
#gcw-chat-messages { flex: 1; padding: 14px; overflow-y: auto; overscroll-behavior: contain; }
.gcw-message {
  margin: 10px 6px; padding: 12px 16px; border-radius: 16px; max-width: 84%;
  width: fit-content; font-size: 13.5px; line-height: 1.55; animation: gcwFadeIn .4s forwards;
}
.gcw-message.user { background: #6b3342; color: #f6eee4; margin-left: auto; border-bottom-right-radius: 5px; }
.gcw-message.bot {
  background: #fff; color: #1e1714; border: 1px solid rgba(196,160,106,.22);
  border-bottom-left-radius: 5px;
}
.gcw-message img { max-width: 200px; border-radius: 12px; margin: 8px 0; display: block; }

#gcw-suggestions { display: flex; gap: 8px; padding: 10px 14px 4px; overflow-x: auto; scrollbar-width: none; }
#gcw-suggestions::-webkit-scrollbar { display: none; }
.gcw-suggestion {
  background: rgba(107,51,66,.08); color: #6b3342; border: 1px solid rgba(107,51,66,.22);
  padding: 8px 14px; border-radius: 30px; cursor: pointer; font-size: 12.5px; flex-shrink: 0;
}
.gcw-suggestion:hover { background: rgba(107,51,66,.16); }

.gcw-calendly-btn, .gcw-consult-btn {
  background: #c4a06a; color: #1e1714; border: none; padding: 11px 18px; border-radius: 30px;
  cursor: pointer; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  margin: 5px 15px; align-self: flex-start;
}
.gcw-learn-more-btn {
  background: transparent; color: #6b3342; border: 1px solid rgba(107,51,66,.35);
  padding: 10px 16px; border-radius: 30px; cursor: pointer; font-size: 13px; margin: 5px 15px;
}

#gcw-chat-input-area { display: flex; align-items: center; gap: 8px; margin: 10px; padding-top: 4px; border-top: 1px solid rgba(196,160,106,.22); }
.gcw-input-wrapper {
  position: relative; flex: 1; background: #fff; border: 1px solid rgba(196,160,106,.28);
  border-radius: 30px; height: 40px; display: flex; align-items: center;
}
#gcw-user-input {
  width: 100%; height: 100%; padding: 0 80px 0 16px; background: transparent; color: #1e1714;
  border: none; font-size: 13px; outline: none;
}
#gcw-user-input::placeholder { color: rgba(30,23,20,.35); }
#gcw-attach-btn, #gcw-voice-btn {
  position: absolute; top: 50%; transform: translateY(-50%); background: transparent; border: none;
  color: rgba(30,23,20,.45); cursor: pointer; width: 20px; height: 20px; padding: 0;
}
#gcw-attach-btn { right: 46px; }
#gcw-voice-btn { right: 14px; }
#gcw-voice-btn.recording { color: #c47a78; }
#gcw-send-btn {
  background: #c4a06a; color: #1e1714; border: none; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: transform .28s cubic-bezier(.16,1,.3,1), background .28s;
}
#gcw-send-btn:hover { transform: scale(1.08) rotate(-8deg); background: #d4b584; }
#gcw-pending-preview { display: none; padding: 0 15px 8px; gap: 8px; }
#gcw-pending-preview.visible { display: flex; }
.gcw-preview-item { position: relative; }
.gcw-preview-item img { max-width: 70px; border-radius: 12px; display: block; }
.gcw-preview-item button {
  position: absolute; top: -6px; right: -6px; background: #1e1714; color: #f6eee4;
  border: none; border-radius: 50%; width: 22px; height: 22px; cursor: pointer;
}
@keyframes gcwFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 768px) {
  #gcw-chat-container {
    width: calc(100vw - 24px) !important; height: 78vh !important;
    bottom: 90px !important; left: 50% !important; transform: translateX(-50%) !important;
  }
  #gcw-user-input { font-size: 16px !important; }
  body.gcw-chat-mobile-open { overflow: hidden; }
  #gcw-chat-bubble:hover, #gcw-chat-bubble.show-text {
    width: 62px; border-radius: 50%; padding: 0; justify-content: center;
  }
  #gcw-chat-bubble:hover .gcw-bubble-text,
  #gcw-chat-bubble.show-text .gcw-bubble-text { max-width: 0; margin-left: 0; }
}
