:root {
  --modal-bg: rgba(255, 255, 255, 0.95);
  --modal-backdrop: rgba(15, 23, 42, 0.5);
  --modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --modal-border: rgba(255, 255, 255, 0.2);
  --modal-radius: 20px;
  --modal-padding: 2rem;
}

/* Modal Container (The Backdrop) */
.ww-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--modal-backdrop);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ww-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Content Box */
.ww-modal-surface {
  background: var(--modal-bg);
  width: 90%;
  max-width: 600px;
  border-radius: var(--modal-radius);
  padding: var(--modal-padding);
  box-shadow: var(--modal-shadow);
  border: 1px solid var(--modal-border);
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.ww-modal-overlay.active .ww-modal-surface {
  transform: scale(1) translateY(0);
}

/* Header */
.ww-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.ww-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.ww-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.ww-modal-close:hover {
  color: #0f172a;
}

/* Body */
.ww-modal-body {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Footer (optional helper) */
.ww-modal-footer {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Custom Scrollbar for the surface overflow */
.ww-modal-surface::-webkit-scrollbar {
  width: 6px;
}
.ww-modal-surface::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
