/* ============================================================
   CUSTOM THEMED DIALOG SYSTEM STYLESHEET
   Replaces default browser alert/confirm boxes with site theme modals
   ============================================================ */

.theme-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-dialog-overlay.active {
  opacity: 1;
  visibility: visible;
}

.theme-dialog-card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.22);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 240, 255, 0.15);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  color: #f8fafc;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-dialog-overlay.active .theme-dialog-card {
  transform: scale(1) translateY(0);
}

/* Header */
.theme-dialog-header {
  padding: 20px 24px 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-dialog-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Icon Variants */
.theme-dialog-icon.info {
  background: rgba(0, 240, 255, 0.12);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.theme-dialog-icon.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.theme-dialog-icon.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.theme-dialog-icon.success {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.theme-dialog-title-wrapper {
  flex: 1;
}

.theme-dialog-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f8fafc;
  margin: 0;
}

.theme-dialog-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 2px;
}

/* Body */
.theme-dialog-body {
  padding: 4px 24px 22px 24px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #cbd5e1;
  word-break: break-word;
  white-space: pre-wrap;
}

.theme-dialog-input {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(3, 7, 18, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-dialog-input:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

body.light-theme .theme-dialog-input {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.2);
  color: #0f172a;
}

body.light-theme .theme-dialog-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.25);
}

/* Footer / Actions */
.theme-dialog-footer {
  padding: 16px 24px 20px 24px;
  background: rgba(3, 7, 18, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.theme-dialog-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.theme-dialog-btn.btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.theme-dialog-btn.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.theme-dialog-btn.btn-confirm {
  background: linear-gradient(135deg, #00f0ff 0%, #00b4d8 100%);
  color: #030712;
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.3);
}

.theme-dialog-btn.btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 240, 255, 0.45);
}

.theme-dialog-btn.btn-confirm.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.theme-dialog-btn.btn-confirm.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5);
}

/* Light Theme Overrides */
body.light-theme .theme-dialog-overlay {
  background: rgba(15, 23, 42, 0.4);
}

body.light-theme .theme-dialog-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18), 0 0 20px rgba(2, 132, 199, 0.1);
  color: #0f172a;
}

body.light-theme .theme-dialog-title {
  color: #0f172a;
}

body.light-theme .theme-dialog-badge {
  color: #64748b;
}

body.light-theme .theme-dialog-body {
  color: #334155;
}

body.light-theme .theme-dialog-footer {
  background: rgba(248, 250, 252, 0.9);
  border-top-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .theme-dialog-btn.btn-cancel {
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  border-color: rgba(15, 23, 42, 0.12);
}

body.light-theme .theme-dialog-btn.btn-cancel:hover {
  background: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body.light-theme .theme-dialog-btn.btn-confirm {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

body.light-theme .theme-dialog-btn.btn-confirm:hover {
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}
