/* Protected-document "Request Access" modal — Task 5.
   Shared across every *_v2 page (see templates/main/_protected_document_
   modal.html). Reuses the --v2-* custom properties already defined in
   home_v2.css, which every *_v2 page loads before this stylesheet, so
   this file never redefines the site's color/spacing tokens itself —
   only fallback values (the `, #hex` part of each var()) are given here
   as a defensive default if that base stylesheet were ever missing. */

.pdm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(27, 42, 74, 0.55);
}

.pdm-overlay[hidden] {
  display: none;
}

.pdm-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--v2-bg, #ffffff);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 32px;
}

.pdm-dialog:focus {
  outline: none;
}

.pdm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--v2-muted, #6b7280);
  cursor: pointer;
  border-radius: 6px;
}

.pdm-close:hover,
.pdm-close:focus-visible {
  color: var(--v2-navy, #1B2A4A);
  background: var(--v2-border, #e5e7eb);
}

.pdm-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--v2-navy, #1B2A4A);
  margin: 0 0 8px;
  padding-right: 24px;
}

.pdm-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--v2-muted, #6b7280);
  margin: 0;
}

.pdm-status {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.pdm-status--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.pdm-status--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Owns the gap between the intro copy and "Full name" (.pdm-status sits
   between them but takes no space while [hidden]). Kept on the form
   itself, not .pdm-desc, since the form is what should visually "start"
   24px below the copy — .pdm-field's own 16px inter-field spacing is
   untouched. */
.pdm-form {
  margin-top: 24px;
}

.pdm-field {
  margin-bottom: 16px;
}

.pdm-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--v2-navy, #1B2A4A);
  margin-bottom: 6px;
}

.pdm-optional {
  font-weight: 400;
  color: var(--v2-muted, #6b7280);
}

.pdm-field input,
.pdm-field textarea {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--v2-border-strong, #c5c6cf);
  border-radius: 8px;
  background: #ffffff;
  color: var(--v2-ink, #1a1c1c);
  box-sizing: border-box;
}

.pdm-field input:focus,
.pdm-field textarea:focus {
  outline: 2px solid var(--v2-orange, #E8672C);
  outline-offset: 1px;
  border-color: var(--v2-orange, #E8672C);
}

.pdm-field textarea {
  resize: vertical;
  min-height: 88px;
}

.pdm-field-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: #b91c1c;
}

.pdm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.pdm-btn {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
}

.pdm-btn--secondary {
  background: transparent;
  color: var(--v2-navy, #1B2A4A);
  border-color: var(--v2-border-strong, #c5c6cf);
}

.pdm-btn--secondary:hover:not(:disabled) {
  border-color: var(--v2-navy, #1B2A4A);
}

.pdm-btn--primary {
  background: var(--v2-navy, #1B2A4A);
  color: #ffffff;
}

.pdm-btn--primary:hover:not(:disabled) {
  background: var(--v2-orange, #E8672C);
}

.pdm-btn--primary:disabled,
.pdm-btn--secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .pdm-dialog {
    padding: 24px;
  }
}
