#wcr-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}

#wcr-popup.is-open {
  display: flex;
}

.wcr-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.wcr-modal {
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  width: min(92vw, 720px);
  position: relative;
  z-index: 9001;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.wcr-modal h2 {
  font-size: 42px;
  line-height: 1.05;
  margin: 0 0 24px;
  font-weight: 800;
  color: #111827;
}

.wcr-modal label {
  display: block;
  margin: 0 0 8px;
  font-weight: 600;
  color: #111827;
}

.wcr-mode-picker {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.wcr-mode-picker legend {
  margin-bottom: 12px;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.wcr-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wcr-mode-option {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 82px;
  margin: 0 !important;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.wcr-mode-option:hover,
.wcr-mode-option.is-selected {
  border-color: #b7791f;
  background: #fffbeb;
  box-shadow: inset 0 0 0 1px #b7791f;
}

.wcr-mode-option.is-disabled {
  cursor: not-allowed;
  opacity: .5;
  background: #f3f4f6;
  box-shadow: none;
}

.wcr-mode-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #b7791f;
}

.wcr-mode-icon {
  color: #d97706;
  font-size: 28px;
  line-height: 1;
}

.wcr-mode-option > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wcr-mode-option strong {
  color: #92400e;
  font-size: 17px;
  line-height: 1.2;
}

.wcr-mode-option small {
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.wcr-scheduled-fields[hidden] {
  display: none !important;
}

.wcr-modal input[type="date"],
.wcr-modal select,
.wcr-box input[type="date"],
.wcr-box select {
  width: 100%;
  min-height: 58px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  padding: 0 18px;
  font-size: 22px;
  box-sizing: border-box;
  background: #fff;
  margin-bottom: 16px;
  color: #111827;
}

.wcr-primary-button {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 14px;
  font-size: 22px;
  cursor: pointer;
  background: #111827;
  color: #fff;
}

.wcr-close {
  position: absolute;
  top: 10px;
  right: 18px;
  border: 0;
  background: none;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  color: #111827;
}

body.wcr-modal-open {
  overflow: hidden;
}

.wcr-box {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #ddd;
  background: #fafafa;
  border-radius: 14px;
}

.wcr-date-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
  flex-wrap: wrap;
}

.wcr-date-row--closed-day .wcr-date-input {
  width: 180px;
}

.wcr-date-input {
  width: 180px;
}

.wcr-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
}

.wcr-hours-table th,
.wcr-hours-table td {
  vertical-align: middle;
}

.wcr-popup-message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #d63638;
  background: #fff5f5;
  color: #8a1f1f;
  border-radius: 8px;
  font-weight: 500;
}

.wcr-lead-time-notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a5f;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
}

/* Opening hours shortcodes */

.wcr-opening-hours-wrap {
  display: grid;
  gap: 16px;
}

.wcr-opening-status-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
}

.wcr-opening-status-card.state-open {
  border-color: #d7eadf;
  background: #f7fbf8;
}

.wcr-opening-status-card.state-closed,
.wcr-opening-status-card.state-opening-later {
  border-color: #e5e7eb;
  background: #fff;
}

.wcr-opening-status-card--single {
  max-width: 680px;
}

.wcr-opening-status-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  background: #f1f3f4;
  color: #202124;
}

.state-open .wcr-opening-status-badge {
  background: #e6f4ea;
  color: #137333;
}

.state-closed .wcr-opening-status-badge,
.state-opening-later .wcr-opening-status-badge {
  background: #f1f3f4;
  color: #3c4043;
}

.wcr-opening-status-text {
  min-width: 0;
}

.wcr-opening-status-headline {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: #202124;
}

.wcr-opening-status-detail {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: #5f6368;
}

.wcr-opening-hours {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.wcr-opening-hours-table {
  width: 100%;
  border-collapse: collapse;
}

.wcr-opening-hours-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f3f4;
}

.wcr-opening-hours-table tr:last-child td {
  border-bottom: 0;
}

.wcr-opening-hours-table td:first-child {
  font-weight: 600;
  color: #202124;
  width: 40%;
}

.wcr-opening-hours-table td:last-child {
  color: #5f6368;
}

.wcr-opening-hours-table td:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wcr-time-hours {
  display: block;
}

/* Mobil */
@media (max-width: 767px) {
  .wcr-modal {
    width: min(94vw, 720px);
    padding: 22px 18px;
    border-radius: 18px;
  }

  .wcr-modal h2 {
    font-size: 30px;
    margin-bottom: 18px;
  }

  .wcr-mode-options {
    grid-template-columns: 1fr;
  }

  .wcr-modal input[type="date"],
  .wcr-modal select,
  .wcr-box input[type="date"],
  .wcr-box select {
    min-height: 52px;
    font-size: 18px;
    border-radius: 14px;
    padding: 0 14px;
  }

  .wcr-primary-button {
    min-height: 56px;
    font-size: 18px;
    border-radius: 12px;
  }

  .wcr-opening-status-card {
    padding: 14px;
    border-radius: 14px;
  }

  .wcr-opening-hours {
    border-radius: 14px;
  }

  .wcr-opening-hours-table td {
    padding: 12px 14px;
  }
}

/* Inline fejlbesked under dato-feltet */
.wcr-inline-error {
  display: none;
  margin: 6px 0 14px;
  padding: 10px 14px;
  border: 1px solid #d63638;
  border-left: 4px solid #d63638;
  background: #fff5f5;
  color: #8a1f1f;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
  line-height: 1.5;
}

/* Admin — deadline preview og kolonnehoveder */
.wcr-th-hint {
  font-weight: normal;
  font-size: 0.85em;
  color: #777;
}

.wcr-deadline-preview {
  display: block;
  margin-top: 4px;
  font-size: 0.82em;
  color: #2271b1;
}

/* Dagsnotat i åbningstider-shortcode */
.wcr-day-note {
  display: block;
  font-size: 0.82em;
  color: #666;
  font-style: italic;
  margin-top: 2px;
}
