/* ===== shared ===== */
#dc-fab, #dc-dialer, #dc-callBubble {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.dc-hidden { display: none !important; }

/* ===== FAB ===== */
#dc-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #10b981;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
#dc-fab:hover { background: #059669; }

/* ===== Dialer panel (light) ===== */
#dc-dialer {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 999998;
  width: 320px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  padding: 16px;
  color: #18181b;
}
.dc-dialer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dc-logo-badge {
  background: #10b981;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
}
.dc-credit-badge {
  background: #f4f4f5;
  color: #52525b;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
}
.dc-input-group { margin-bottom: 12px; }
.dc-input-group label { display: block; font-size: 12px; color: #52525b; margin-bottom: 4px; font-weight: 500; }
#dc-dialer input, #dc-dialer select {
  width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid #e4e4e7;
  border-radius: 8px; font-size: 14px; color: #18181b;
}
.dc-btn-primary {
  width: 100%; padding: 10px; border: none; border-radius: 10px; font-weight: 600;
  font-size: 14px; cursor: pointer; background: #10b981; color: #fff; margin-top: 4px;
}
.dc-btn-primary:hover { background: #059669; }
.dc-msg { margin-top: 10px; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.dc-msg.dc-error { background: #fee2e2; color: #991b1b; }
.dc-msg.dc-success { background: #dcfce7; color: #166534; }

.dc-callerid-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #fafafa; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
  font-size: 13px; color: #71717a; font-weight: 500; gap: 8px;
}
.dc-callerid-row span {
  flex-shrink: 0;
}
.dc-callerid-row select {
  width: auto; min-width: 130px; font-weight: 600; color: #18181b;
  border: 1px solid #e4e4e7; border-radius: 10px; padding: 6px 10px;
}
.dc-dial-box { background: #fafafa; border: 1px solid #f4f4f5; border-radius: 12px; padding: 10px; }
.dc-number-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dc-number-row input {
  flex: 1; background: #fff; border: 1px solid #e4e4e7; border-radius: 10px;
  height: 44px; padding: 0 12px; font-size: 15px; font-weight: 500;
}
.dc-call-fab {
  width: 44px; height: 44px; border-radius: 10px; border: none; background: #10b981;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 12px rgba(16,185,129,0.3); flex-shrink: 0;
}
.dc-call-fab:hover { background: #059669; }

.dc-keypad-toggle-row { display: flex; justify-content: start; }
.dc-pill-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  background: #fff; border: 1px solid #e4e4e7; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #52525b; cursor: pointer;
}
.dc-pill-btn:hover { background: #f4f4f5; }
.dc-close-pill { color: #ef4444; margin-bottom: 10px; }
.dc-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dc-key {
  height: 46px; background: #fff; border: 1px solid #f4f4f5; border-radius: 10px;
  font-size: 17px; font-weight: 600; color: #18181b; cursor: pointer;
}
.dc-key:hover { background: #f4f4f5; }
.dc-powered-by { text-align: center; font-size: 11px; color: #a1a1aa; margin-top: 12px; }
.dc-debug-line { font-size: 10px; color: #d4d4d8; margin-top: 6px; font-family: monospace; }

/* ===== Call bubble (dark) ===== */
#dc-callBubble {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 999999;
  background: #1e1e1e;
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  width: 320px;
}
#dc-cb-minimized {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; gap: 8px;
}
.dc-cb-min-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #18181b;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.dc-cb-icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: #2a2a2a;
  color: #cbd5e1; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.dc-cb-icon-btn:hover { background: #333; }
.dc-cb-hangup { background: #dc2626; color: #fff; }
.dc-cb-hangup:hover { background: #b91c1c; }
.dc-cb-answer { background: #10b981; color: #fff; }
.dc-cb-answer:hover { background: #059669; }
.dc-cb-hangup-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: #dc2626;
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

#dc-cb-full { padding: 18px; position: relative; }
.dc-cb-min-toggle {
  position: absolute; top: 10px; right: 12px; background: none; border: none;
  color: #71717a; font-size: 18px; cursor: pointer;
}
.dc-cb-top-row { display: flex; align-items: center; gap: 10px; padding-right: 16px; }
.dc-cb-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #18181b;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-size: 18px; flex-shrink: 0;
}
.dc-cb-info { flex: 1; min-width: 0; }
.dc-cb-info h2 { font-size: 15px; font-weight: 500; margin: 0; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-cb-info p { font-size: 12px; color: #a1a1aa; margin: 2px 0 0; }
.dc-cb-controls { display: flex; gap: 6px; flex-shrink: 0; }
.dc-cb-divider { border-top: 1px solid #2a2a2a; margin: 12px 0; }
.dc-cb-bottom-row { display: flex; align-items: center; justify-content: space-between; }
.dc-cb-direction { font-size: 12px; color: #a1a1aa; }
.dc-cb-duration-pill {
  background: #272727; padding: 4px 12px; border-radius: 999px; font-size: 12px; color: #fff;
  font-family: monospace;
}
/* ===== manage row (bottom of dialer) ===== */
.dc-manage-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #a1a1aa;
  cursor: pointer;
}
.dc-manage-row:hover { color: #52525b; }
.dc-manage-gear { font-size: 13px; }

/* ===== loading state ===== */
#dc-loadingSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 10px;
  text-align: center;
}
.dc-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e4e4e7;
  border-top-color: #10b981;
  border-radius: 50%;
  animation: dc-spin 0.8s linear infinite;
  margin-bottom: 14px;
}
@keyframes dc-spin { to { transform: rotate(360deg); } }
#dc-loadingText { font-size: 14px; font-weight: 600; color: #18181b; margin: 0; }
.dc-loading-sub { font-size: 12px; color: #a1a1aa; margin: 4px 0 0; }

/* ===== settings modal ===== */
#dc-settingsModal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dc-settings-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  color: #18181b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.dc-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}
#dc-settingsModal .dc-input-group { margin-bottom: 12px; }
#dc-settingsModal input, #dc-settingsModal select {
  width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid #e4e4e7;
  border-radius: 8px; font-size: 14px;
}
.dc-btn-secondary {
  width: 100%; padding: 10px; border: none; border-radius: 10px; font-weight: 600;
  font-size: 14px; cursor: pointer; background: #f4f4f5; color: #18181b; margin-top: 8px;
}
.dc-btn-secondary:hover { background: #e4e4e7; }
.dc-btn-danger {
  width: 100%; padding: 10px; border: none; border-radius: 10px; font-weight: 600;
  font-size: 14px; cursor: pointer; background: #fee2e2; color: #991b1b; margin-top: 8px;
}
.dc-btn-danger:hover { background: #fecaca; }