/* ── Utility Classes ── */
.edr2-hidden {
  display: none !important;
}

.edr2-invisible {
  visibility: hidden !important;
}

/* ── Loading Overlay ── */
.edr2-cto-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.edr2-cto-overlay.active {
  opacity: 1;
  visibility: visible;
}

.edr2-cto-overlay-content {
  text-align: center;
  background: var(--edr2-bg, #ffffff);
  color: var(--edr2-text, #333333);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  max-width: 90%;
  width: 400px;
}

/* ── Spinners ── */
.edr2-cto-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 115, 170, 0.1);
  border-left-color: #0073aa;
  border-radius: 50%;
  animation: edr2-spin 1s linear infinite;
  margin-bottom: 20px;
}

/* Overlay specific spinner spacing override */
.edr2-cto-overlay .edr2-cto-spinner {
  margin-bottom: 20px;
}

@keyframes edr2-spin {
  to { transform: rotate(360deg); }
}

.edr2-cto-overlay h2 {
  margin: 0 0 10px 0;
  font-size: 20px;
  color: inherit;
}

.edr2-cto-overlay p {
  margin: 0;
  opacity: 0.8;
  font-size: 15px;
}

/* ── Status Badges ── */
.edr2-status-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.edr2-status-pending-review { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.edr2-status-production-ready { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.edr2-status-processing { background: #cce5ff; color: #004085; border: 1px solid #b8daff; }
.edr2-status-completed { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.edr2-status-cancelled { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── Messages ── */
.edr2-msg {
  padding: 15px 20px;
  border-radius: 4px;
  margin: 20px 0;
  font-weight: 500;
}
.edr2-msg-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.edr2-msg-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* ── Dark Mode Awareness ── */
@media (prefers-color-scheme: dark) {
  .edr2-cto-overlay-content {
    background: #1e1e1e;
    color: #e0e0e0;
  }
  .edr2-cto-spinner {
    border-color: rgba(79, 148, 212, 0.1);
    border-left-color: #4f94d4;
  }
  .edr2-status-pending-review { background: #332b00; color: #ffe69c; border-color: #4d3d00; }
  .edr2-status-production-ready { background: #1c3320; color: #99ffaa; border-color: #264d2c; }
  .edr2-status-processing { background: #1a2a33; color: #99d6ff; border-color: #263d4d; }
  .edr2-status-completed { background: #1a3333; color: #99ffff; border-color: #264d4d; }
  .edr2-status-cancelled { background: #331a1a; color: #ff9999; border-color: #4d2626; }
}
