/* consent.css - Human-In-The-Loop approval modal for PC operations */

#consent-modal {
  /* Inherits base styles from dialog.modal in tokens.css */
}

#consent-modal .modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 12px;
}

.consent-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: var(--warning);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.consent-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

#consent-modal .modal-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.consent-timer {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.consent-timer.is-urgent {
  color: var(--danger);
  background: var(--danger-soft);
}

.consent-desc {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}

.consent-details {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

.consent-progress {
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.consent-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--warning);
  border-radius: 999px;
  transition: width 1s linear, background-color 0.2s ease;
}

.consent-progress-bar.is-urgent {
  background: var(--danger);
}

#consent-modal .modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  #consent-modal .modal-foot {
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  }

  #consent-modal .consent-btn-approve {
    order: 1;
    width: 100%;
  }

  #consent-modal .consent-btn-reject {
    order: 2;
    width: 100%;
  }
}
