/* Request Revision — full Display Panel authoring (not modal) */

.cp-rev-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
  padding: 12px 14px 16px;
  color: #f2f5f8;
  box-sizing: border-box;
}

.cp-rev-panel-head {
  flex: 0 0 auto;
}

.cp-rev-panel-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(126, 227, 164, 0.9);
}

.cp-rev-panel-title {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 800;
}

.cp-rev-panel-creating {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: rgba(242, 245, 248, 0.78);
}

.cp-rev-panel-updated {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #f0c14b;
}

.cp-rev-panel-timeline {
  flex: 0 0 auto;
  min-width: 0;
}

.cp-rev-panel-timeline .cp-overview-timeline {
  margin: 0;
}

.cp-rev-panel-timeline .cp-timeline-flag:disabled {
  cursor: default;
  opacity: 1;
}

.cp-rev-panel-timeline .cp-timeline-flag.is-draft {
  box-shadow: 0 0 0 0 rgba(126, 227, 164, 0.45);
  animation: cp-np-flag-pulse 2.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cp-rev-panel-timeline .cp-timeline-flag.is-draft {
    animation: none;
    box-shadow: 0 0 0 2px rgba(126, 227, 164, 0.35);
  }
}

.cp-rev-panel-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cp-rev-panel-form .cp-np-field-message {
  flex: 1 1 auto;
  min-height: 160px;
}

.cp-rev-panel-form .cp-np-editor-host {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cp-rev-panel-form .cp-np-editor {
  flex: 1 1 auto;
  min-height: 200px;
  height: 100%;
}

.cp-rev-panel-form .cp-np-editor-surface {
  flex: 1 1 auto;
  min-height: 180px;
}

/* Match New Project: thumbnails flush-left inside the dropzone (not centered). */
.cp-rev-panel-form .cp-np-drop {
  text-align: left;
}

.cp-rev-panel-form .cp-np-drop-empty {
  text-align: center;
}

.cp-rev-panel-form .cp-np-file-grid {
  justify-content: start;
  justify-items: start;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-rev-panel-progress {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  flex: 0 0 auto;
}

.cp-rev-panel-progress-bar {
  height: 100%;
  background: linear-gradient(to right, #2f83b1, #4fb0dc);
}

.cp-rev-panel-progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

.cp-rev-panel-actions {
  margin-top: auto;
  flex: 0 0 auto;
}

.cp-rev-panel-form #cp-rev-title.is-invalid,
.cp-rev-panel-form [data-cp-rev-comments-host].is-invalid,
.cp-rev-panel-form [data-cp-rev-drop].is-invalid,
.cp-rev-panel-form .cp-np-editor.is-invalid {
  border-color: #ff8a8a !important;
  box-shadow: 0 0 0 1px rgba(255, 138, 138, 0.45);
}

.cp-rev-error {
  display: block;
  margin-top: 4px;
  color: #ffb4b4;
  font-size: 12px;
}

.cp-rev-error[hidden] {
  display: none !important;
}

.cp-rev-status {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.cp-rev-status[data-tone="error"] {
  background: rgba(180, 60, 60, 0.35);
}

.cp-rev-status[data-tone="success"] {
  background: rgba(60, 140, 90, 0.35);
}

@media (max-height: 760px) {
  .cp-rev-panel-form .cp-np-editor {
    min-height: 140px;
  }

  .cp-rev-panel-form .cp-np-editor-surface {
    min-height: 120px;
  }
}

.cp-rev-archive-choice {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 12, 16, 0.72);
}

.cp-rev-archive-choice-card {
  width: min(420px, 100%);
  padding: 20px;
  border-radius: 12px;
  background: #1a2028;
  color: #f3f6f8;
}

.cp-rev-archive-choice-card h2,
.cp-rev-archive-choice-card p {
  margin: 0 0 12px;
}

.cp-rev-archive-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-rev-archive-choice-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #243041;
  color: #f3f6f8;
  font-weight: 600;
}

/* Revisions. The panel is not the New Project draft, so the same contract is
   repeated here: Comments absorbs free height and the host keeps a 200px floor. */
#client-portal-shell .client-portal-display-body:has(> .cp-rev-panel) {
  overflow: hidden;
}

#client-portal-shell .cp-rev-panel {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

#client-portal-shell .cp-rev-panel > .cp-rev-panel-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

#client-portal-shell .cp-rev-panel-form .cp-np-field-message,
#client-portal-shell.is-small-screen-focus .cp-rev-panel-form .cp-np-field-message {
  flex: 1 1 auto;
  min-height: 252px;
  overflow: visible;
}

#client-portal-shell .cp-rev-panel-form .cp-np-editor-host,
#client-portal-shell.is-small-screen-focus .cp-rev-panel-form .cp-np-editor-host {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: auto;
  min-height: 200px;
  max-height: none;
  overflow: hidden;
}

#client-portal-shell .cp-rev-panel-form .cp-np-editor,
#client-portal-shell.is-small-screen-focus .cp-rev-panel-form .cp-np-editor {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
}

#client-portal-shell .cp-rev-panel-form .cp-np-editor-surface,
#client-portal-shell.is-small-screen-focus .cp-rev-panel-form .cp-np-editor-surface {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#client-portal-shell .cp-rev-panel-form .cp-np-field-attachments,
#client-portal-shell.is-small-screen-focus .cp-rev-panel-form .cp-np-field-attachments {
  flex: 0 0 auto;
}

#client-portal-shell .cp-rev-panel-form .cp-np-actions,
#client-portal-shell.is-small-screen-focus .cp-rev-panel-form .cp-np-actions {
  position: static;
  margin-top: 0;
}
