/* static/css/ram_modal.css */
/* Unified RAMSTAT Modal Design System */

.ram-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(20, 18, 16, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.ram-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ram-modal-card {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  max-width: 100%;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px 26px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.20), 0 4px 16px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.07);
  font-family: "Onest", system-ui, -apple-system, sans-serif;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.ram-modal-overlay.is-open .ram-modal-card {
  transform: scale(1) translateY(0);
}

.ram-modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.ram-modal-close-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.ram-modal-badge {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.ram-modal-badge svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.2;
}

/* Badge variants */
.ram-modal-badge--trash,
.ram-modal-badge--danger {
  background: #fff1f2;
  color: #e11d48;
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.18);
}

.ram-modal-badge--warning {
  background: #fff7ed;
  color: #ea580c;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.18);
}

.ram-modal-badge--info {
  background: #eff6ff;
  color: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.ram-modal-badge--success {
  background: #ecfdf5;
  color: #10b981;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.18);
}

.ram-modal-badge--dev {
  background: #f5f3ff;
  color: #7c3aed;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.18);
}

.ram-modal-title {
  margin: 0 0 10px;
  font-family: "Onest", system-ui, -apple-system, sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: #182032;
  word-break: break-word;
}

.ram-modal-desc {
  margin: 0 0 24px;
  font-family: "Onest", system-ui, -apple-system, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  color: #64748b;
  font-weight: 400;
  max-width: 390px;
  word-break: break-word;
}

.ram-modal-desc strong {
  font-weight: 600;
  color: #1e293b;
}

.ram-modal-desc-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  line-height: 1.4;
}

.ram-modal-desc-sub {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 4px;
}

.ram-modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.ram-modal-actions:empty {
  display: none;
}

.ram-modal-btn {
  height: 44px;
  min-width: 110px;
  padding: 0 22px;
  border-radius: 12px;
  font-family: "Onest", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-sizing: border-box;
}

.ram-modal-btn--cancel {
  background: #f1f5f9;
  color: #475569;
}

.ram-modal-btn--cancel:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.ram-modal-btn--primary {
  background: #182032;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(24, 32, 50, 0.22);
}

.ram-modal-btn--primary:hover {
  background: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(24, 32, 50, 0.32);
}

.ram-modal-btn--primary:active {
  transform: translateY(0);
}

.ram-modal-btn--danger {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.28);
}

.ram-modal-btn--danger:hover {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.38);
}

.ram-modal-btn--danger:active {
  transform: translateY(0);
}

body.ram-modal-open {
  overflow: hidden !important;
}
