/**
 * GMP PDF Settings Page Redesign v1.0.0
 * Modern card-based layout matching dashboard style
 */

/* Only on PDF settings page */
body.template-print-pdf .content {
  background: #f5f5f7 !important;
  min-height: 100vh;
}

body.template-print-pdf .content__main {
  max-width: 800px !important;
  margin: 0 auto !important;
  padding: 40px 24px !important;
}

/* Page title */
body.template-print-pdf .content__main > h1,
body.template-print-pdf .content__main > h2 {
  display: none !important;
}

/* The form itself */
body.template-print-pdf #create-pdf {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Hide original labels that we'll restyle */
body.template-print-pdf #create-pdf > label {
  display: none !important;
}

/* Section cards */
body.template-print-pdf .pdf-section-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}

body.template-print-pdf .pdf-section-card__title {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 6px 0;
}

body.template-print-pdf .pdf-section-card__subtitle {
  font-size: 13px;
  color: #888;
  margin: 0 0 20px 0;
}

/* Plan name input */
body.template-print-pdf .pdf-name-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  color: #1a1a2e;
  background: #f9f9fb;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

body.template-print-pdf .pdf-name-input:focus {
  border-color: #00d4ff;
  background: #fff;
}

/* Cover image section */
body.template-print-pdf .print__modal__cover-image-block {
  margin-bottom: 0 !important;
}

body.template-print-pdf .print__modal__cover-image-block h3 {
  display: none !important;
}

body.template-print-pdf .print__modal__cover-image-block p {
  display: none !important;
}

body.template-print-pdf .filepond--root {
  margin-bottom: 0 !important;
}

body.template-print-pdf .filepond--panel-root {
  background: #f9f9fb !important;
  border: 2px dashed #ddd !important;
  border-radius: 12px !important;
}

body.template-print-pdf .filepond--drop-label {
  color: #888 !important;
  font-size: 14px !important;
}

/* Settings grid */
body.template-print-pdf .pdf-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  body.template-print-pdf .pdf-settings-grid {
    grid-template-columns: 1fr;
  }
}

body.template-print-pdf .pdf-settings-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

body.template-print-pdf .pdf-settings-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  color: #1a1a2e;
  background: #f9f9fb;
  appearance: auto;
  outline: none;
  cursor: pointer;
}

body.template-print-pdf .pdf-settings-field select:focus {
  border-color: #00d4ff;
}

/* Colour picker styling */
body.template-print-pdf .sp-replacer {
  border: 1px solid #ddd !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  background: #f9f9fb !important;
}

/* Hide original field columns */
body.template-print-pdf .print__field-col {
  display: none !important;
}

body.template-print-pdf .print__additional-settings {
  display: contents !important;
}

/* Content options checkboxes */
body.template-print-pdf .pdf-content-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.template-print-pdf .pdf-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f9f9fb;
  border: 1px solid #eee;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}

body.template-print-pdf .pdf-option-row:hover {
  border-color: #00d4ff;
}

body.template-print-pdf .pdf-option-row input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: #00d4ff;
  cursor: pointer;
  flex-shrink: 0;
}

body.template-print-pdf .pdf-option-label {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a2e;
}

body.template-print-pdf .pdf-option-desc {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* Hide original todo checkbox */
body.template-print-pdf #create-pdf > .print__additional-settings > div:last-child {
  display: none !important;
}

/* Action buttons */
body.template-print-pdf .print__modal__buttons {
  display: none !important;
}

body.template-print-pdf .pdf-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

body.template-print-pdf .pdf-btn-generate {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  background: #00d4ff;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

body.template-print-pdf .pdf-btn-generate:hover {
  background: #00b8e0;
  color: #fff;
}

body.template-print-pdf .pdf-btn-save {
  padding: 16px 24px;
  background: #f0f0f2;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

body.template-print-pdf .pdf-btn-save:hover {
  background: #e4e4e6;
  color: #333;
}

/* Progress bar */
body.template-print-pdf .pdf-progress-bar {
  display: none;
}

/* Page header */
body.template-print-pdf .pdf-page-header {
  text-align: center;
  margin-bottom: 32px;
}

body.template-print-pdf .pdf-page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px 0;
}

body.template-print-pdf .pdf-page-header p {
  font-size: 15px;
  color: #888;
  margin: 0;
}

/* Hide the original h2 title "Grand Master Plan Settings" */
body.template-print-pdf .entry-content > h2:first-child,
body.template-print-pdf .content__main h2.pdf-settings-title {
  display: none !important;
}

/* Powered by PQINA text */
body.template-print-pdf .filepond--credits {
  display: none !important;
}

/* Download link after generation */
body.template-print-pdf #download_plan {
  display: none;
}

body.template-print-pdf #download_plan[href]:not([href=""]) {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: #22c55e;
  color: #fff !important;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 12px;
}

/* Fix: Hide overlay message with "Grand Master Plan Settings" h4 */
body.template-print-pdf .overlay__message {
  display: none !important;
}

/* Fix: Hide "Upload Cover Image" label inside cover block */
body.template-print-pdf .print__modal__cover-image-block > label {
  display: none !important;
}

/* Fix: Hide duplicate Question Colour label from cloned color picker */
body.template-print-pdf .pdf-settings-field .sp-replacer + label,
body.template-print-pdf .pdf-settings-field > div > label {
  display: none !important;
}

/* Fix: Hide "Grand Master Plan Settings" h4 in content block */
body.template-print-pdf .content__block > h4 {
  display: none !important;
}

/* Fix: Hide original form content that leaks below our cards */
body.template-print-pdf #create-pdf > .print__modal__title {
  display: none !important;
}

body.template-print-pdf #create-pdf > input {
  display: none !important;
}