/* Demo request inbox panel (header) */
.mc-chrome__demo-requests {
  position: relative;
  z-index: 2;
}

.mc-chrome__demo-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.mc-chrome__demo-requests[hidden],
body.mc-chrome-signed-out .mc-chrome__demo-requests {
  display: none !important;
  pointer-events: none !important;
}

.mc-chrome__demo-requests[aria-pressed="true"] .mc-chrome__icon-svg,
.mc-chrome__bar[data-mc-indicator-active="demo-requests"] .mc-chrome__demo-requests .mc-chrome__icon-svg {
  color: inherit;
}

.mc-chrome__bar[data-mc-indicator-active="demo-requests"] .mc-chrome__demo-requests {
  color: inherit;
}

body.mc-demo-panel-open {
  overflow: hidden;
}

.mc-demo-panel {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.mc-demo-panel[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.mc-demo-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.mc-demo-panel__drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(1120px, 100vw);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--mc-glass-border, rgba(15, 23, 42, 0.08));
  box-shadow: -20px 0 56px rgba(15, 23, 42, 0.14);
  animation: mc-demo-panel-in 0.34s cubic-bezier(0.34, 1.25, 0.64, 1);
}

@keyframes mc-demo-panel-in {
  from { transform: translate3d(100%, 0, 0); opacity: 0.6; }
  to { transform: translate3d(0, 0, 0); opacity: 1; }
}

.mc-demo-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--mc-glass-border, rgba(15, 23, 42, 0.08));
  background: linear-gradient(180deg, rgba(0, 48, 222, 0.04) 0%, transparent 100%);
}

.mc-demo-panel__kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 48, 222, 0.72);
}

.mc-demo-panel__title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.15;
}

.mc-demo-panel__lead {
  margin: 8px 0 0;
  color: var(--mc-text-muted, #64748b);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 56ch;
}

.mc-demo-panel__body {
  flex: 1;
  overflow: auto;
  padding: 18px 24px 32px;
}

.mc-demo-panel__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  width: fit-content;
  max-width: 100%;
}

.mc-demo-panel__tab {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mc-text-muted, #64748b);
  transition: background 0.15s, color 0.15s;
}

.mc-demo-panel__tab:hover {
  color: inherit;
  background: rgba(255, 255, 255, 0.6);
}

.mc-demo-panel__tab.is-active {
  background: #fff;
  color: #0030de;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.mc-demo-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 48, 222, 0.05);
  border: 1px solid rgba(0, 48, 222, 0.1);
  font-size: 0.88rem;
  color: var(--mc-text-muted, #64748b);
}

.mc-demo-panel__meta strong {
  color: inherit;
  font-weight: 700;
}

.mc-demo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.mc-demo-kpi {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.mc-demo-kpi__label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mc-text-muted, #64748b);
}

.mc-demo-kpi__value {
  margin: 6px 0 0;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
}

.mc-demo-kpi--warn .mc-demo-kpi__value { color: #dc2626; }
.mc-demo-kpi--ok .mc-demo-kpi__value { color: #1a7f4b; }
.mc-demo-kpi--default .mc-demo-kpi__value { color: #0030de; }

.mc-demo-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.mc-demo-filters__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mc-demo-filters__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mc-text-muted, #64748b);
  min-width: 72px;
}

.mc-demo-filter {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.mc-demo-filter:hover {
  border-color: rgba(0, 48, 222, 0.25);
}

.mc-demo-filter.is-active {
  background: rgba(0, 48, 222, 0.1);
  border-color: rgba(0, 48, 222, 0.35);
  color: #0030de;
}

.mc-demo-filter--tag.is-active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #b45309;
}

.mc-demo-inbox-layout {
  display: grid;
  grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
  gap: 14px;
  min-height: 480px;
  align-items: stretch;
}

.mc-demo-inbox-list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  max-height: min(68vh, 640px);
}

.mc-demo-inbox-list__head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mc-text-muted, #64748b);
}

.mc-demo-inbox-list__body {
  overflow: auto;
  flex: 1;
}

.mc-demo-inbox-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.mc-demo-inbox-row:hover {
  background: rgba(15, 23, 42, 0.03);
}

.mc-demo-inbox-row.is-selected {
  background: rgba(0, 48, 222, 0.06);
  box-shadow: inset 3px 0 0 #0030de;
}

.mc-demo-inbox-row__dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.2);
}

.mc-demo-inbox-row__dot--new { background: #dc2626; }
.mc-demo-inbox-row__dot--contacted { background: #2563eb; }
.mc-demo-inbox-row__dot--resolved { background: #1a7f4b; }

.mc-demo-inbox-row__main {
  min-width: 0;
}

.mc-demo-inbox-row__title {
  display: block;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.mc-demo-inbox-row__meta {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--mc-text-muted, #64748b);
  line-height: 1.35;
}

.mc-demo-inbox-row__time {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--mc-text-muted, #64748b);
  white-space: nowrap;
}

.mc-demo-inbox-empty {
  padding: 28px 16px;
  margin: 0;
  text-align: center;
  color: var(--mc-text-muted, #64748b);
  font-size: 0.9rem;
}

.mc-demo-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  max-height: min(68vh, 640px);
}

.mc-demo-detail--empty {
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--mc-text-muted, #64748b);
  text-align: center;
}

.mc-demo-detail__scroll {
  overflow: auto;
  flex: 1;
  padding: 0 0 16px;
}

.mc-demo-detail__hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(0, 48, 222, 0.03) 0%, transparent 100%);
}

.mc-demo-detail__avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #0030de;
  background: rgba(0, 48, 222, 0.1);
}

.mc-demo-detail__hero h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}

.mc-demo-detail__sub {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--mc-text-muted, #64748b);
}

.mc-demo-detail__sub a {
  color: #0030de;
  text-decoration: none;
}

.mc-demo-detail__sub a:hover {
  text-decoration: underline;
}

.mc-demo-detail__badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mc-demo-detail__badge--new {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.mc-demo-detail__badge--contacted {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.mc-demo-detail__badge--resolved {
  background: rgba(26, 127, 75, 0.1);
  color: #1a7f4b;
}

.mc-demo-detail__section {
  padding: 14px 18px 0;
}

.mc-demo-detail__section > h4 {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mc-text-muted, #64748b);
}

.mc-demo-detail__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.mc-demo-detail__field dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mc-text-muted, #64748b);
}

.mc-demo-detail__field dd {
  margin: 2px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  word-break: break-word;
}

.mc-demo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mc-demo-tag {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.mc-demo-tag:hover {
  border-color: rgba(0, 48, 222, 0.25);
}

.mc-demo-tag.is-active {
  background: rgba(0, 48, 222, 0.12);
  border-color: rgba(0, 48, 222, 0.35);
  color: #0030de;
}

.mc-demo-tag--warn.is-active {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.35);
  color: #dc2626;
}

.mc-demo-tag--ok.is-active {
  background: rgba(26, 127, 75, 0.1);
  border-color: rgba(26, 127, 75, 0.35);
  color: #1a7f4b;
}

.mc-demo-tag--inline {
  cursor: default;
  font-size: 11px;
  padding: 3px 8px;
}

.mc-demo-inbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.mc-demo-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.mc-demo-card {
  margin: 14px 18px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.02);
}

.mc-demo-card > h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
}

.mc-demo-card__hint {
  margin: -6px 0 12px;
  font-size: 0.82rem;
  color: var(--mc-text-muted, #64748b);
}

.mc-demo-reply__body {
  min-height: 130px;
  resize: vertical;
}

.mc-demo-card .mc-ws-page__label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.mc-demo-thread-list {
  padding-bottom: 4px;
}

.mc-demo-thread {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.mc-demo-thread header {
  font-size: 0.78rem;
  color: var(--mc-text-muted, #64748b);
  margin-bottom: 6px;
}

.mc-demo-thread header strong {
  color: inherit;
  font-weight: 700;
}

.mc-demo-thread--reply {
  border-left: 3px solid rgba(0, 48, 222, 0.5);
}

.mc-demo-thread--note {
  border-left: 3px solid rgba(245, 158, 11, 0.65);
}

.mc-demo-thread__subject {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

.mc-demo-thread__body {
  white-space: pre-wrap;
  font: inherit;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.mc-demo-form-field {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
}

.mc-demo-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .mc-demo-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mc-demo-detail__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .mc-demo-panel__drawer {
    width: 100vw;
  }

  .mc-demo-inbox-layout {
    grid-template-columns: 1fr;
  }

  .mc-demo-inbox-list,
  .mc-demo-detail {
    max-height: none;
  }
}
