/* Copyright © 2026 Ian Manseau. Remanet proprietary software. See LICENSE.txt. */

/* ==========================================================================
   Support Remanet: Dialog & Interface Styles
   Matches Remanet's obsidian dark theme and design tokens.
   ========================================================================== */

/* Dialog Backing & Overlay */
.support-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 520px;
  width: calc(100% - 32px);
  margin: auto;
  overflow: visible;
  color: #dbe7f5;
  font-family: Inter, Arial, sans-serif;
}

.support-dialog::backdrop {
  background: rgba(6, 14, 24, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: supportFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.support-dialog[open] {
  animation: supportDialogIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Content Card */
.support-dialog-content {
  position: relative;
  background: linear-gradient(155deg, #091524 0%, #0d1e34 50%, #122640 100%);
  border: 1px solid rgba(130, 175, 235, 0.28);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(2, 6, 14, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  padding: 36px 32px 32px;
  box-sizing: border-box;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

/* Close Button */
.support-dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a5bdd4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.support-dialog-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.support-dialog-close:active {
  transform: scale(0.96);
}

.support-dialog-close:focus-visible {
  outline: 2px solid #7cb4e8;
  outline-offset: 2px;
}

/* Header & Typography */
.support-header {
  margin-bottom: 24px;
}

.support-eyebrow {
  font: 11px/1.6 'DM Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7ca0c4;
  margin: 0 0 8px 0;
}

.support-header h2 {
  font: 500 28px/1.2 Georgia, 'Times New Roman', serif;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0 0 14px 0;
}

.support-intro {
  font-size: 13.5px;
  line-height: 1.6;
  color: #a5bdd4;
  margin: 0;
}

.support-intro p {
  margin: 0 0 10px 0;
}

.support-intro p:last-child {
  margin-bottom: 0;
}

.support-intro strong {
  color: #ffffff;
  font-weight: 600;
}

.support-intro .support-pitch {
  color: #c4d8ee;
  border-top: 1px solid rgba(130, 175, 235, 0.15);
  padding-top: 10px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
}


/* Contribution Choices Grid */
.support-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0 0 24px 0;
}

.support-option {
  position: relative;
  background: rgba(16, 30, 50, 0.72);
  border: 1px solid rgba(130, 175, 235, 0.22);
  border-radius: 12px;
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.18s ease,
              border-color 0.18s ease,
              box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
  min-height: 72px;
  box-sizing: border-box;
}

.support-option:hover {
  background: rgba(24, 44, 72, 0.85);
  border-color: rgba(160, 210, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(3, 8, 16, 0.35);
  text-decoration: none;
}

.support-option.is-selected,
.support-option[aria-checked="true"] {
  background: rgba(28, 52, 85, 0.95);
  border-color: #7cb4e8;
  box-shadow: 0 0 0 1px #7cb4e8, 0 8px 24px rgba(3, 8, 18, 0.45);
  transform: translateY(-1px);
}

.support-option:focus-visible {
  outline: 2px solid #7cb4e8;
  outline-offset: 2px;
}

.support-amount {
  font: 600 22px/1.2 Inter, Arial, sans-serif;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.support-label {
  font: 12px/1.4 'DM Mono', monospace;
  color: #8ba8c8;
  transition: color 0.18s ease;
}

.support-option.is-selected .support-label,
.support-option[aria-checked="true"] .support-label {
  color: #b9d8f8;
}

/* Footer & Actions */
.support-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-note {
  font-size: 11px;
  line-height: 1.5;
  color: #6d88a4;
  text-align: center;
  margin: 0;
}

/* Success View */
.support-view[hidden] {
  display: none !important;
}

.support-success-view h2 {
  font: 500 26px/1.25 Georgia, 'Times New Roman', serif;
  color: #ffffff;
  letter-spacing: -0.015em;
  margin: 0 0 12px 0;
}

.support-success-view .support-intro {
  font-size: 15px;
  line-height: 1.65;
  color: #b8cde4;
  margin: 0 0 24px 0;
}

.support-done-btn {
  width: 100%;
  min-height: 44px;
}

/* Header & Navigation Trigger Accents */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-support-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #3b5375;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 83, 117, 0.22);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.16s ease;
  white-space: nowrap;
  line-height: inherit;
  cursor: pointer;
}

.header-support-btn:hover {
  color: #0c1a2d;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(59, 83, 117, 0.45);
}

.site-header nav a.active,
.site-header nav a[aria-current="page"] {
  color: #0c1a2d !important;
  font-weight: 600 !important;
}

.hero-support {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #3b5375;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(59, 83, 117, 0.22);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.16s ease;
  white-space: nowrap;
}

.hero-support:hover {
  color: #0c1a2d;
  background: #ffffff;
  border-color: rgba(59, 83, 117, 0.45);
  box-shadow: 0 4px 12px rgba(10, 30, 60, 0.08);
}

/* Footer Link Accent */
.footer-support-link {
  color: #25476f;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-support-link:hover {
  color: #122a45;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Keyframes */
@keyframes supportFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes supportDialogIn {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive Rules */
@media (max-width: 540px) {
  .support-dialog-content {
    padding: 28px 18px 24px;
  }
  .support-header h2 {
    font-size: 24px;
  }
  .support-options {
    gap: 10px;
  }
  .support-option {
    padding: 14px 12px;
    min-height: 68px;
  }
  .support-amount {
    font-size: 19px;
  }
}

@media (max-width: 360px) {
  .support-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .support-dialog::backdrop,
  .support-dialog[open],
  .support-dialog-content,
  .support-option,
  .support-dialog-close {
    animation: none !important;
    transition: none !important;
  }
}
