: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;
}

/* Modal Utility Classes (Bootstrap-like) - Required for Standalone Modals */
.text-center {
    text-align: center !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-success {
    color: #198754 !important;
}

.text-muted {
    color: #64748b !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.w-100 {
    width: 100% !important;
}

.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Button Styles */
.btn {
    display: inline-block;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.btn-danger {
    color: #fff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-danger:hover {
    background-color: #bb2d3b !important;
    border-color: #b02a37 !important;
}

.btn-dark {
    color: #fff !important;
    background-color: #2a3136 !important;
    border-color: #2a3136 !important;
}

.btn-dark:hover {
    background-color: #23292d !important;
    border-color: #23292d !important;
}

/* Fix for icons in modals */
.ww-modal-body i {
    display: inline-block;
    margin-bottom: 1rem;
}

.ww-modal-body h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
