.gcb-digitals-widget {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.gcb-digitals-widget__title {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.gcb-digitals-widget__section {
  margin-bottom: 12px;
  border: none;
  padding: 0;
}

.gcb-digitals-widget__placeholder {
  font-size: 12px;
  color: #e2e8f0;
  opacity: 0.95;
  padding: 10px 12px;
  min-height: 150px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.gcb-digitals-widget__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gcb-digitals-widget__item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  text-align: left;
}

.gcb-digitals-widget__item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.gcb-digitals-widget__item.is-active {
  background: rgba(94, 234, 212, 0.1);
  border-color: rgba(94, 234, 212, 0.4);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.35);
}

.gcb-digitals-widget__label {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
}

.gcb-digitals-widget__empty {
  color: #cbd5e1;
  font-size: 13px;
  padding: 6px 2px;
}

.gcb-digitals-widget__status {
  font-size: 12px;
  color: #cbd5e1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gcb-digitals-widget__status.is-visible {
  opacity: 1;
}

.gcb-digitals-widget__status.is-error {
  color: #fca5a5;
}

.gcb-digitals-widget__item.is-skeleton {
  position: relative;
  overflow: hidden;
  color: transparent;
}

.gcb-digitals-widget__item.is-skeleton .pill,
.gcb-digitals-widget__item.is-skeleton .label {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.gcb-digitals-widget__item.is-skeleton .pill {
  width: 60px;
  height: 16px;
}

.gcb-digitals-widget__item.is-skeleton .label {
  width: 120px;
  height: 16px;
}

.gcb-digitals-widget__item.is-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: gcbDigitalsShimmer 1.2s infinite;
}

@keyframes gcbDigitalsShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.gcb-digitals-overlay {
  position: absolute;
  inset: 0;
  z-index: 8000;
  display: block;
  opacity: 1;
  pointer-events: none;
}

.gcb-digitals-overlay.is-off-desktop {
  pointer-events: none;
  opacity: 0;
}

.gcb-digitals-overlay.is-visible {
  pointer-events: none;
}

.gcb-digitals-overlay__backdrop {
  position: absolute;
  top: calc(var(--gcb-menubar-height, 36px) + 6px);
  left: 0;
  right: calc(var(--gcb-widget-tray-width, 320px) + 16px);
  bottom: calc(var(--gcb-taskbar-height, 48px) + 6px);
  background: transparent;
  pointer-events: none;
}

.gcb-digitals-overlay__panel {
  position: absolute;
  top: calc(var(--gcb-menubar-height, 36px) + 20px);
  left: 28px;
  right: calc(var(--gcb-widget-tray-width, 320px) + 20px);
  max-width: min(980px, calc(100vw - var(--gcb-widget-tray-width, 320px) - 72px));
  bottom: calc(var(--gcb-taskbar-height, 48px) + 20px);
  background: linear-gradient(180deg, #ffffff, #f5f7fb);
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.28s ease;
  pointer-events: auto;
  z-index: 8000;
}

.gcb-digitals-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
}

.gcb-digitals-columns {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 6px;
  height: 100%;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.gcb-digitals-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  padding: 12px;
  min-width: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(6px);
}

.gcb-digitals-rail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.gcb-digitals-rail__actions {
  display: flex;
  gap: 6px;
}

.gcb-digitals-panel-topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 12px 8px 14px;
  background: linear-gradient(180deg, #e8edf4, #dbe3ed);
  border-radius: 14px 14px 0 0;
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.gcb-digitals-panel-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  align-items: stretch;
}

.gcb-digitals-panel-topbar__end {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  border: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b1221;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.14s ease, color 0.14s ease;
}

.gcb-digitals-panel-topbar__end:hover {
  background: #e9eef6;
}

.gcb-digitals-panel-topbar__end:active {
  background: #dce6f3;
}

.gcb-digitals-panel-tab {
  position: relative;
  border: none;
  background: transparent;
  color: #111827;
  border-radius: 0;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  height: 100%;
  box-shadow: none;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.1s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.gcb-digitals-panel-tab + .gcb-digitals-panel-tab::before {
  content: '';
  position: absolute;
  left: -0.5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(15, 23, 42, 0.12);
}

.gcb-digitals-panel-tab.is-active {
  background: #eef3f8;
  color: #0b1221;
  box-shadow: inset 0 -2px 0 rgba(37, 99, 235, 0.22);
  font-weight: 700;
}

.gcb-digitals-panel-tab:hover {
  background: #f4f7fb;
  color: #0b1221;
}

.gcb-digitals-panel-view {
  display: none;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 16px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: #ffffff;
}

.gcb-digitals-panel-view.is-active {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gcb-chatroom-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 6px;
  height: 100%;
  min-height: 0;
}

.gcb-chatroom-col {
  border-radius: 10px;
  padding: 0;
  height: 100%;
  box-sizing: border-box;
  min-height: 0;
}

.gcb-chatroom-col--left {
  background: #e4f3ff;
}

.gcb-chatroom-col--center {
  background: #ffffff;
}

.gcb-chatroom-col--right {
  background: #ffe7f1;
}

.gcb-chatroom-center {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  border-radius: 8px;
  padding: 10px;
}

.gcb-chatroom-section {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  min-height: 0;
}

.gcb-chatroom-section--top {
  min-height: 60px;
}

.gcb-chatroom-section--main {
  flex: 1 1 auto;
}

.gcb-chatroom-section--bottom {
  min-height: 80px;
}

.gcb-digitals-placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 18px;
  color: #cbd5e1;
  font-size: 13px;
}

.gcb-digitals-rail__actions button,
.gcb-digitals-tabbtn,
.gcb-digitals-tool__delete,
.gcb-digitals-overlay__close,
.gcb-digitals-overlay__send,
.gcb-digitals-rail__session-delete {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.gcb-digitals-rail__search {
  width: auto;
  min-width: 120px;
  max-width: 160px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 6px;
  min-height: 22px;
  max-height: 26px;
  overflow-y: auto;
  background: #fff;
  font-size: 12px;
  line-height: 1.3;
  align-self: flex-start;
}

.gcb-digitals-rail__list,
.gcb-digitals-rail__session-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gcb-digitals-rail__item {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.gcb-digitals-rail__item.is-active {
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.18);
}

.gcb-digitals-rail__item-title {
  font-weight: 700;
  color: #0f172a;
}

.gcb-digitals-rail__item-meta {
  color: #475569;
  font-size: 12px;
}

.gcb-digitals-rail__sessions {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 8px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gcb-digitals-rail__sessions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.gcb-digitals-rail__session-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.gcb-digitals-rail__session {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  text-align: left;
}

.gcb-digitals-rail__session.is-active {
  border-color: #34d399;
}

.gcb-digitals-rail__session-title {
  font-weight: 600;
}

.gcb-digitals-rail__session-meta {
  display: block;
  font-size: 12px;
  color: #475569;
}

.gcb-digitals-rail__session-delete {
  width: 34px;
  height: 34px;
}

.gcb-digitals-rail__empty {
  color: #475569;
  font-size: 13px;
}

.gcb-digitals-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  padding: 10px;
  min-width: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f5f7fb);
}

.gcb-digitals-panel-view {
  display: none;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 14px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: #ffffff;
}

.gcb-digitals-panel-view.is-active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gcb-digitals-placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 18px;
  color: #cbd5e1;
  font-size: 13px;
}

.gcb-digitals-tabs {
  display: flex;
  gap: 8px;
}

.gcb-digitals-tabbtn.is-active {
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.18);
}

.gcb-digitals-views {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.gcb-digitals-view {
  display: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

.gcb-digitals-view.is-active {
  display: flex;
}

.gcb-digitals-instructions {
  width: 100%;
  min-height: 260px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.gcb-digitals-instructions__actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

/* Chat layout: scrollable history with sticky composer */
.gcb-digitals-view[data-tab-view="chat"] {
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.gcb-digitals-view[data-tab-view="chat"] .gcb-digitals-overlay__body {
  flex: 1;
  overflow: auto;
  max-height: none;
  min-height: 0;
  padding: 12px;
}

.gcb-digitals-overlay__prompt {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 10px 0 0;
  border-top: 1px solid #e2e8f0;
  z-index: 1;
}

.gcb-digitals-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.gcb-digitals-tool {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.gcb-digitals-tool__name {
  font-weight: 700;
  color: #0f172a;
}

.gcb-digitals-tool__meta {
  color: #475569;
  font-size: 12px;
}

.gcb-digitals-tools__form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 6px;
}

.gcb-digitals-detail {
  display: grid;
  grid-template-columns: 140px 1fr;
  padding: 6px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.gcb-digitals-detail__label {
  color: #475569;
  font-weight: 600;
}

.gcb-digitals-detail__value {
  color: #0f172a;
}

.gcb-digitals-model-select {
  min-width: 180px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 10px;
  margin-right: 8px;
  background: #fff;
}
.gcb-digitals-overlay.is-visible .gcb-digitals-overlay__panel {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1024px) {
  .gcb-digitals-overlay__backdrop {
    top: calc(var(--gcb-menubar-height, 36px) + 12px);
    bottom: calc(var(--gcb-taskbar-height, 48px) + 12px);
    right: 12px;
  }
  .gcb-digitals-overlay__panel {
    top: calc(var(--gcb-menubar-height, 36px) + 16px);
    bottom: calc(var(--gcb-taskbar-height, 48px) + 16px);
    right: 18px;
    left: 18px;
  }
}

.gcb-digitals-overlay__status {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(103, 232, 249, 0.18);
  border: 1px solid rgba(103, 232, 249, 0.4);
  color: #0f172a;
  padding: 6px 10px;
  border-radius: 10px;
  display: none;
}

.gcb-digitals-overlay__status.is-error {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.4);
  color: #b91c1c;
}

.gcb-digitals-overlay__status.is-visible {
  display: inline-flex;
}

.gcb-digitals-overlay__body {
  overflow: auto;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  padding: 12px;
}

.gcb-digitals-overlay__head {
  display: grid;
  gap: 2px;
  color: #0f172a;
  padding-right: 40px;
}

.gcb-digitals-overlay__title {
  font-weight: 800;
  font-size: 1.2rem;
  color: #0f172a;
}

.gcb-digitals-overlay__meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #475569;
}

.gcb-digitals-overlay__empty {
  color: #475569;
  font-size: 13px;
}

.gcb-digitals-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.gcb-digitals-message.is-user {
  border-color: rgba(52, 211, 153, 0.35);
  background: #ecfdf3;
}

.gcb-digitals-message__meta {
  font-size: 12px;
  color: #475569;
}

.gcb-digitals-message__text {
  white-space: pre-wrap;
  line-height: 1.5;
  color: #0f172a;
}

.gcb-digitals-overlay__prompt {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.gcb-digitals-overlay__input {
  flex: 1;
  min-height: 60px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  padding: 10px 12px;
  resize: vertical;
}

.gcb-digitals-overlay__input:focus {
  outline: none;
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.gcb-digitals-overlay__send {
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  color: #0f172a;
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.gcb-digitals-overlay__send:hover {
  transform: translateY(-1px);
}

.gcb-digitals-overlay__send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.gcb-digitals-window {
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gcb-digitals-window__title {
  font-size: 20px;
  font-weight: 700;
}

.gcb-digitals-window__text {
  margin: 0;
  color: #cbd5e1;
}

.gcb-digitals-window__cta {
  align-self: flex-start;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}
