:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #d1d5db;
  --brand: #1f6d52;
  --brand-dark: #14513c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(170deg, #f7f9fd 0%, #eef5f3 100%);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 20px;
}

.container {
  width: min(760px, 100%);
  background: var(--panel);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

h1 {
  margin: 0;
  font-size: 26px;
}

.hint {
  margin: 10px 0 18px;
  color: var(--muted);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}

textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

select {
  background-color: white;
  cursor: pointer;
  appearance: auto;
}

button {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  padding: 11px 18px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--brand-dark);
}

.result {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #86efac;
}

.result.error {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* ── Install Banner (Add to Home Screen) ── */
.install-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #1f6d52 0%, #14513c 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  animation: slideBannerDown 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideBannerDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.install-banner-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.install-banner-icon {
  font-size: 36px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.install-banner-text {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.install-banner-text strong {
  font-size: 15px;
}

.install-banner-text span {
  font-size: 12.5px;
  opacity: 0.85;
}

.install-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.install-btn-primary {
  background: #fff !important;
  color: var(--brand) !important;
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.install-btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 12px rgba(255,255,255,0.3);
  background: #fff !important;
}

.install-btn-dismiss {
  background: transparent !important;
  color: rgba(255,255,255,0.8) !important;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.install-btn-dismiss:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08) !important;
}

/* Push page content down when banner is visible */
.install-banner:not([hidden]) ~ main {
  margin-top: 16px;
}

@media (max-width: 480px) {
  .install-banner-content {
    padding: 14px 16px;
    gap: 10px;
  }
  .install-banner-actions {
    width: 100%;
    justify-content: stretch;
  }
  .install-btn-primary,
  .install-btn-dismiss {
    flex: 1;
    text-align: center;
  }
}

/* ── Notification Permission Banner ── */
.notif-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
  animation: slideNotifUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideNotifUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.notif-banner-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.notif-banner-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.notif-banner-text {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-banner-text strong {
  font-size: 15px;
}

.notif-banner-text span {
  font-size: 12.5px;
  opacity: 0.85;
}

.notif-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.notif-btn-primary {
  background: #fff !important;
  color: #b45309 !important;
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.notif-btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 12px rgba(255,255,255,0.3);
  background: #fff !important;
}

.notif-btn-dismiss {
  background: transparent !important;
  color: rgba(255,255,255,0.8) !important;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.notif-btn-dismiss:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08) !important;
}

@media (max-width: 480px) {
  .notif-banner-content {
    padding: 14px 16px;
    gap: 10px;
  }
  .notif-banner-actions {
    width: 100%;
  }
  .notif-btn-primary,
  .notif-btn-dismiss {
    flex: 1;
    text-align: center;
  }
}
