/* ░░ FamiBudget landing — widget chat support ░░ */
:root {
  --fbc-indigo: #4f47c4;
  --fbc-indigo-deep: #1a1830;
  --fbc-surface: #ffffff;
  --fbc-bg: #f3f3f7;
  --fbc-text: #15151c;
  --fbc-mid: #6c6d7a;
  --fbc-border: #e7e7ef;
}

#fbc-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--fbc-indigo);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(79, 71, 196, 0.6);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#fbc-launcher:hover { transform: translateY(-2px); }
#fbc-launcher svg { width: 26px; height: 26px; }

#fbc-launcher .fbc-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e0466e;
  border: 2px solid #fff;
  display: none;
}
#fbc-launcher.fbc-has-unread .fbc-dot { display: block; }

#fbc-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 9999;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: var(--fbc-surface);
  border: 1px solid var(--fbc-border);
  border-radius: 18px;
  box-shadow: 0 24px 60px -16px rgba(26, 24, 48, 0.4);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}
#fbc-panel.fbc-open { display: flex; }

.fbc-header {
  background: var(--fbc-indigo-deep);
  background-image: linear-gradient(155deg, #3a3270 0%, #1a1830 100%);
  color: #fff;
  padding: 16px 18px;
}
.fbc-header h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.fbc-header p { margin: 4px 0 0; font-size: 12px; color: rgba(243, 241, 250, 0.7); }
.fbc-header .fbc-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 16px;
}

.fbc-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--fbc-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fbc-intro {
  font-size: 13px; color: var(--fbc-mid); line-height: 1.5;
  background: #fff; border: 1px solid var(--fbc-border);
  border-radius: 12px; padding: 12px 14px;
}
.fbc-msg { max-width: 80%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; word-wrap: break-word; }
.fbc-msg.visitor { align-self: flex-end; background: var(--fbc-indigo); color: #fff; border-bottom-right-radius: 4px; }
.fbc-msg.admin { align-self: flex-start; background: #fff; color: var(--fbc-text); border: 1px solid var(--fbc-border); border-bottom-left-radius: 4px; }
.fbc-msg .fbc-who { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 3px; opacity: 0.7; }

.fbc-footer { border-top: 1px solid var(--fbc-border); background: #fff; padding: 10px; }
.fbc-email {
  width: 100%; box-sizing: border-box; border: 1px solid var(--fbc-border);
  border-radius: 10px; padding: 8px 10px; font-size: 12.5px; margin-bottom: 8px;
  font-family: inherit; color: var(--fbc-text);
}
.fbc-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.fbc-input {
  flex: 1; resize: none; border: 1px solid var(--fbc-border); border-radius: 10px;
  padding: 9px 11px; font-size: 13.5px; font-family: inherit; max-height: 90px; color: var(--fbc-text);
}
.fbc-send {
  border: none; background: var(--fbc-indigo); color: #fff; cursor: pointer;
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none;
}
.fbc-send:disabled { opacity: 0.5; cursor: default; }
.fbc-send svg { width: 18px; height: 18px; }
