/* Resource Center — DISPLAY PANEL options + sample Saved Drafts cards */

.client-portal-display-body:has(.cp-resource-center) {
  overflow: hidden;
  padding: 0;
}

.cp-resource-center {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  gap: 12px;
}

.cp-resource-center-options {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
}

.cp-resource-center-option {
  display: grid;
  justify-items: start;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(47, 131, 177, 0.55);
  background: linear-gradient(to bottom, #4fb0dc, #2f83b1);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: filter 120ms ease;
}

.cp-resource-center-option-label {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.6px;
}

.cp-resource-center-option-hint {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.cp-resource-center-option:hover {
  filter: brightness(1.08);
}

.cp-resource-center[data-resource-center-view="draw-sketch"] {
  padding: 12px;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.cp-resource-center[data-resource-center-view="draw-sketch"] .cp-ds-panel {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
}

.cp-resource-drafts-toolbar {
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
  z-index: 2;
  margin: 2px 2px 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1c2024;
}

.cp-resource-drafts-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cp-resource-drafts-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cp-resource-drafts-search-input {
  flex: 1 1 220px;
  min-width: 0;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.25);
  color: #f2f5f8;
  padding: 0 12px;
  font-size: 12px;
}

.cp-resource-drafts-search-input:focus {
  outline: none;
  border-color: #59b7de;
}

.cp-resource-drafts-search-btn,
.cp-resource-drafts-search-clear,
.cp-resource-drafts-clear-filters {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
}

.cp-resource-drafts-search-btn:hover,
.cp-resource-drafts-search-clear:hover,
.cp-resource-drafts-clear-filters:hover {
  background: rgba(255, 255, 255, 0.14);
}

.cp-resource-drafts-search-clear[hidden] {
  display: none !important;
}

.cp-resource-drafts-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  align-items: end;
}

.cp-resource-drafts-filter {
  display: grid;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: rgba(242, 245, 248, 0.7);
  text-transform: uppercase;
}

.cp-resource-drafts-filter select {
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #2a2e33;
  color: #f2f5f8;
  padding: 0 8px;
  font-size: 12px;
  color-scheme: dark;
}

.cp-resource-drafts-filter select option {
  background-color: #2a2e33;
  color: #f2f5f8;
}

.cp-resource-drafts-count {
  margin: 0;
  font-size: 11px;
  color: rgba(242, 245, 248, 0.66);
}

.cp-resource-drafts-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.cp-resource-drafts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.cp-resource-draft-card {
  background: #ffffff;
  color: #111111;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 236px;
}

.cp-resource-draft-card[data-archive-action="canceled"],
.cp-resource-draft-card[data-archive-action="deleted"] {
  color: #ffffff;
  backdrop-filter: blur(16px) saturate(1.45);
  -webkit-backdrop-filter: blur(16px) saturate(1.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.cp-resource-draft-card[data-archive-action="canceled"] {
  background: linear-gradient(
    165deg,
    rgba(4, 116, 196, 0.58) 0%,
    rgba(4, 116, 196, 0.36) 100%
  );
  border-color: rgba(4, 116, 196, 0.72);
}

.cp-resource-draft-card[data-archive-action="deleted"] {
  background: linear-gradient(
    165deg,
    rgba(226, 72, 12, 0.58) 0%,
    rgba(226, 72, 12, 0.36) 100%
  );
  border-color: rgba(226, 72, 12, 0.72);
}

.cp-resource-draft-card[data-archive-action="canceled"] .cp-resource-draft-kind,
.cp-resource-draft-card[data-archive-action="canceled"] h3,
.cp-resource-draft-card[data-archive-action="canceled"] .cp-resource-draft-details p,
.cp-resource-draft-card[data-archive-action="deleted"] .cp-resource-draft-kind,
.cp-resource-draft-card[data-archive-action="deleted"] h3,
.cp-resource-draft-card[data-archive-action="deleted"] .cp-resource-draft-details p {
  color: #ffffff;
}

.cp-resource-draft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.cp-resource-draft-kind {
  margin: 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #111111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-resource-draft-card h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111111;
}

.cp-resource-draft-delete {
  flex: 0 0 auto;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #f2f2f2;
  color: #111111;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.cp-resource-draft-delete:hover {
  background: rgba(217, 83, 79, 0.92);
  border-color: #b33a36;
  color: #ffffff;
}

.cp-resource-draft-details {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  min-height: 0;
}

.cp-resource-draft-details p {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  color: #333333;
  overflow-wrap: anywhere;
}

.cp-resource-draft-message {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cp-resource-drafts-empty {
  margin: 0;
  font-size: 13px;
  color: rgba(242, 245, 248, 0.72);
}

.cp-resource-archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cp-resource-archive-files {
  margin: 0;
  padding-left: 18px;
}
