/* Isolated channel-detail settings layout. Loaded after admin.css to prevent legacy rules from affecting this panel. */
.workspace-editor-box.channel-detail-box {
  width: min(1040px, calc(100vw - 40px));
  max-height: min(780px, calc(100vh - 36px));
}

.channel-rich{border:1px solid #dbe4ef;border-radius:10px;overflow:hidden;background:#fff}.channel-rich-toolbar{display:flex;align-items:center;gap:6px;min-height:42px;padding:6px 8px;border-bottom:1px solid #e5edf6;background:#f8fafc}.channel-rich-toolbar button,.channel-rich-toolbar select,.channel-rich-toolbar input{height:30px;border:1px solid #dbe4ef;border-radius:7px;background:#fff;color:#344054;font-weight:700;padding:0 9px;cursor:pointer}.channel-rich-toolbar input[type=color]{width:34px;padding:3px}.channel-auto-rich-editor{min-height:104px;padding:12px 14px;outline:0;line-height:1.65;color:#172033;white-space:pre-wrap;word-break:break-word}.channel-auto-rich-editor:focus{box-shadow:inset 0 0 0 2px rgba(23,105,224,.18)}.channel-auto-message{align-items:start}.channel-auto-message .channel-rich{min-width:0;flex:1}.channel-auto-delete{margin-top:6px;border:1px solid #fecaca;border-radius:8px;background:#fff;color:#e54b4b;font-weight:800;padding:9px 12px;cursor:pointer}

.channel-detail-box .workspace-editor-body {
  min-height: 0;
  height: min(630px, calc(100vh - 180px));
  padding: 0;
  overflow: hidden;
  background: #f3f6fa;
}

.channel-details-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.channel-details-nav {
  padding: 18px 12px;
  overflow: auto;
  background: #fff;
  border-right: 1px solid #e2e8f0;
}

.channel-details-nav-title {
  display: grid;
  gap: 4px;
  padding: 0 12px 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid #edf1f6;
}

.channel-details-nav-title span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-details-nav-title small {
  color: #718096;
  font-size: 12px;
}

.channel-details-nav button {
  display: block;
  width: 100%;
  padding: 12px;
  color: #58677c;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
}

.channel-details-nav button:hover {
  color: #1769e0;
  background: #f5f8fc;
}

.channel-details-nav button.is-active {
  color: #1769e0;
  background: #eff6ff;
  border-left-color: #1769e0;
}

.channel-details-main {
  min-width: 0;
  padding: 24px;
  overflow: auto;
}

.channel-setting-panel { display: none; }
.channel-setting-panel.is-active { display: block; }

.channel-setting-heading { margin-bottom: 16px; }
.channel-setting-heading span { display: block; font-size: 18px; font-weight: 800; }
.channel-setting-heading p { margin: 6px 0 0; color: #66758d; font-size: 13px; line-height: 1.55; }

.channel-setting-card,
.channel-access-card {
  padding: 20px;
  background: #fff;
  border: 1px solid #e0e8f2;
  border-radius: 10px;
}

.channel-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.channel-readonly-field { display: grid; align-content: center; gap: 7px; margin-bottom: 14px; }
.channel-readonly-field span { font-size: 14px; font-weight: 800; }
.channel-readonly-field strong { color: #66758d; font-size: 14px; font-weight: 500; }

.channel-detail-box .channel-identity-panel {
  padding: 20px;
  margin-top: 16px;
  background: #fff;
  border: 1px solid #e0e8f2;
  border-radius: 10px;
}

.channel-access-card { min-height: 340px; }
.channel-access-kicker { display: inline-block; margin-bottom: 10px; color: #1769e0; font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.channel-access-card h5 { margin: 0 0 8px; font-size: 18px; }
.channel-access-card > p { max-width: 680px; margin: 0; color: #66758d; line-height: 1.65; }
.channel-access-card code { padding: 1px 4px; color: #1d4f91; background: #eef3f8; border-radius: 4px; }
.channel-access-value { padding: 12px 14px; margin-top: 18px; color: #275080; font-size: 13px; line-height: 1.5; word-break: break-all; background: #f8fbff; border: 1px solid #dbe7f6; border-radius: 8px; }
.channel-access-code { max-height: 200px; padding: 14px; margin: 18px 0 0; overflow: auto; color: #d7eaff; font: 12px/1.6 Consolas, "Courier New", monospace; white-space: pre-wrap; word-break: break-word; background: #10223d; border: 1px solid #dbe7f6; border-radius: 8px; }
.channel-access-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.channel-question-card { padding: 20px; background: #fff; border: 1px solid #e0e8f2; border-radius: 10px; }
.channel-question-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid #edf1f6; }
.channel-question-head strong { display: block; font-size: 16px; }
.channel-question-head p { margin: 5px 0 0; color: #66758d; font-size: 13px; line-height: 1.55; }
.channel-question-fields { margin-top: 16px; }
.channel-question-list { display: grid; gap: 8px; }
.channel-question-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 8px; background: #f8fbff; border: 1px solid #e1eaf5; border-radius: 8px; }
.channel-question-row.is-dragging { opacity: .45; border-style: dashed; }
.channel-question-grip { color: #94a3b8; font-size: 17px; font-weight: 900; line-height: 1; letter-spacing: -3px; cursor: grab; user-select: none; }
.channel-question-row .input { padding: 8px 10px; background: #fff; }
.channel-question-remove { padding: 7px 9px; color: #d14343; font-size: 13px; font-weight: 800; cursor: pointer; background: #fff; border: 1px solid #f1d5d5; border-radius: 7px; }
.channel-question-add { margin-top: 12px; }
.channel-question-layout { margin-top: 20px; padding-top: 18px; border-top: 1px solid #edf1f6; }
.channel-question-layout > strong { display: block; margin-bottom: 10px; font-size: 14px; }
.channel-layout-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.channel-layout-options button { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 0 10px; align-items: center; padding: 13px; color: #475569; text-align: left; cursor: pointer; background: #fff; border: 1px solid #dbe5f1; border-radius: 9px; }
.channel-layout-options button:hover { border-color: #95bff5; background: #f8fbff; }
.channel-layout-options button.is-selected { color: #1769e0; background: #f1f7ff; border-color: #1769e0; box-shadow: 0 0 0 2px rgba(23,105,224,.09); }
.channel-layout-options b { font-size: 14px; }
.channel-layout-options small { grid-column: 2; margin-top: 3px; color: #7b8aa0; font-size: 12px; }
.layout-bars { display: grid; gap: 3px; width: 35px; padding: 7px; background: #eef5ff; border-radius: 7px; }
.layout-bars i { display: block; height: 4px; background: #65a5f4; border-radius: 99px; }
.layout-bars.horizontal { grid-template-columns: repeat(3, 1fr); gap: 2px; }
.layout-bars.horizontal i { height: 16px; }

.channel-auto-stack { display: grid; gap: 14px; }
.channel-auto-card { padding: 18px; background: #fff; border: 1px solid #e0e8f2; border-radius: 10px; }
.channel-auto-card.compact { padding-bottom: 12px; }
.channel-auto-fields { display: grid; gap: 12px; margin-top: 16px; }
.channel-auto-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.channel-auto-label label { color: #66758d; font-size: 13px; cursor: pointer; }
.channel-auto-label input { accent-color: #1769e0; }
.channel-auto-message { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px; background: #f8fbff; border: 1px solid #e1eaf5; border-radius: 8px; }
.channel-auto-message .textarea { min-height: 64px; background: #fff; }
.channel-auto-message button { padding: 7px 9px; color: #d14343; font-size: 13px; font-weight: 800; cursor: pointer; background: #fff; border: 1px solid #f1d5d5; border-radius: 7px; }
.channel-delay-field { display: flex; align-items: center; gap: 8px; color: #52637a; font-size: 14px; }
.channel-delay-field .input { width: 94px; padding: 8px 10px; }

@media (max-width: 760px) {
  .channel-question-head { display: grid; }
  .channel-question-row { grid-template-columns: 22px minmax(0, 1fr); }
  .channel-question-remove { grid-column: 2; justify-self: end; }
  .channel-layout-options { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .workspace-editor-box.channel-detail-box { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .channel-detail-box .workspace-editor-body { height: calc(100vh - 150px); }
  .channel-details-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .channel-details-nav { display: flex; gap: 4px; padding: 10px; overflow: auto; border-right: 0; border-bottom: 1px solid #e2e8f0; }
  .channel-details-nav-title { display: none; }
  .channel-details-nav button { width: auto; padding: 9px 11px; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .channel-details-nav button.is-active { border-bottom-color: #1769e0; }
  .channel-details-main { padding: 14px; }
  .channel-detail-grid { grid-template-columns: 1fr; }
  .channel-access-card { min-height: 0; }
  .channel-access-actions .btn { flex: 1; }
}
