/* ============================================================
   Digital Fortrydelsesfunktion – Frontend Modal
   ============================================================ */

:root {
  --wr-primary:        #1a5276;
  --wr-primary-hover:  #154360;
  --wr-secondary:      #aab7b8;
  --wr-danger:         #c0392b;
  --wr-success:        #1e8449;
  --wr-text:           #2c3e50;
  --wr-border:         #d5d8dc;
  --wr-bg:             #ffffff;
  --wr-radius:         6px;
  --wr-shadow:         0 20px 60px rgba(0,0,0,0.25);
  --wr-z:              99999;
}

/* Modal container */
.wr-modal {
  position: fixed;
  inset: 0;
  z-index: var(--wr-z);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wr-modal[hidden] {
  display: none !important;
}

/* Backdrop */
.wr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

/* Box */
.wr-modal__box {
  position: relative;
  background: var(--wr-bg);
  border-radius: var(--wr-radius);
  box-shadow: var(--wr-shadow);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 2rem 2.25rem 2.25rem;
  color: var(--wr-text);
}

/* Close button */
.wr-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--wr-secondary);
  padding: 0 0.3rem;
  transition: color 0.15s;
}
.wr-modal__close:hover { color: var(--wr-text); }

/* Heading */
.wr-modal__heading {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--wr-text);
}

/* Intro */
.wr-modal__intro {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--wr-border);
}
.wr-modal__intro p { margin: 0 0 0.75em; }
.wr-modal__intro p:last-child { margin-bottom: 0; }

/* Form fields */
.wr-field {
  margin-bottom: 1.1rem;
}

.wr-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--wr-text);
}

.wr-field input[type="text"],
.wr-field input[type="email"],
.wr-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--wr-border);
  border-radius: var(--wr-radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--wr-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fafafa;
}

.wr-field input:focus,
.wr-field textarea:focus {
  outline: none;
  border-color: var(--wr-primary);
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.15);
  background: #fff;
}

.wr-field input.wr-invalid,
.wr-field textarea.wr-invalid {
  border-color: var(--wr-danger);
}

/* Notice */
.wr-form__notice {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 1rem;
}

/* Error */
.wr-form__error {
  background: #fdf2f0;
  border: 1px solid var(--wr-danger);
  border-radius: var(--wr-radius);
  color: var(--wr-danger);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Actions */
.wr-form__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Buttons */
.wr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: var(--wr-radius);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  min-width: 130px;
}

.wr-btn--primary {
  background: var(--wr-primary);
  color: #fff;
  border-color: var(--wr-primary);
}
.wr-btn--primary:hover:not(:disabled) {
  background: var(--wr-primary-hover);
  border-color: var(--wr-primary-hover);
}
.wr-btn--primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.wr-btn--secondary {
  background: transparent;
  color: var(--wr-text);
  border-color: var(--wr-border);
}
.wr-btn--secondary:hover {
  background: #f2f3f4;
}

/* Success state */
.wr-modal__success {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}
.wr-success__icon {
  width: 56px;
  height: 56px;
  color: var(--wr-success);
  margin-bottom: 1rem;
}
.wr-modal__success p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--wr-text);
}

/* Responsive */
@media (max-width: 480px) {
  .wr-modal__box { padding: 1.5rem 1.25rem 1.75rem; }
  .wr-form__actions { flex-direction: column-reverse; }
  .wr-btn { width: 100%; }
}

/* ============================================================
   Modal footer – WPBackup branding
   ============================================================ */
.wr-modal__footer {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--wr-border);
  font-size: 0.75rem;
  color: #aaa;
  text-align: right;
}
.wr-modal__footer a {
  color: #aaa;
  text-decoration: none;
}
.wr-modal__footer a:hover { color: var(--wr-primary); }

/* ============================================================
   WooCommerce – Min konto kolonneknap
   ============================================================ */
.woocommerce-orders-table .wr-wc-trigger {
  white-space: nowrap;
}
.wr-expired {
  color: #aaa;
  font-size: 0.85rem;
}
