﻿/* ============================================================
   modal.css - custom popup overlay
   ============================================================ */

/* ?? Backdrop ?? */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 4, 14, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

/* ?? Panel ?? */
.modal-panel {
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: rgba(18, 16, 38, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 28px 28px 22px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 1px 0  rgba(255,255,255,0.08) inset,
    0 32px 80px rgba(0, 0, 0, 0.7),
    0 4px  20px rgba(0, 0, 0, 0.5);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.28s var(--ease-spring), opacity 0.22s ease;
  opacity: 0;
}

.modal-backdrop.show .modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ?? Icon badge ?? */
.modal-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.modal-icon img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.modal-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-icon.error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

.modal-icon.warn {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #fcd34d;
}

.modal-icon.info {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
}

/* ?? Text ?? */
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0;
  line-height: 1.3;
}

.modal-body {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}

.modal-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.modal-body h2 {
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.modal-body .seo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  margin-top: 16px;
}

.modal-body .seo-grid h3 {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.25;
  margin-bottom: 4px;
}

.modal-body .seo-grid p {
  margin: 0;
}

/* ?? Action row ?? */
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-btn {
  min-width: 86px;
  padding: 10px 20px;
  border: 1px solid var(--button-border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
  letter-spacing: 0;
  outline: none;
}

/* primary dismiss button */
.modal-btn.primary {
  background: var(--button-bg);
  color: #fff;
  box-shadow: var(--button-shadow);
}

.modal-btn.primary:hover {
  transform: translateY(-1px);
  background: var(--button-bg-hover);
  box-shadow: var(--button-shadow-hover);
}

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

.modal-btn.primary:focus-visible {
  box-shadow: var(--button-shadow), var(--button-focus);
}

/* secondary / ghost button */
.modal-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.modal-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-btn.secondary:focus-visible {
  box-shadow: var(--button-focus);
}

