/* style.css - frosted glass buttons + UI polish */

body {
  font-family: "Inter", sans-serif;
  /* keep a colorful background so frosted effect is visible */
  background: linear-gradient(135deg, #eef6ff 0%, #f8f0ea 50%, #fff7f2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  /* slightly more transparent so backdrop-filter on children has content to blur */
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
  padding: 28px;
  max-width: 720px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.6);
}

h2 {
  margin-bottom: 8px;
  font-size: 1.4rem;
  color: #0f172a;
}

label {
  display: block;
  margin-top: 12px;
  font-weight: 700;
  color: #0f172a;
}

input, textarea, select, button, .button-link {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.06);
  font-size: 1rem;
  box-sizing: border-box;
  color: #0f172a;
  background: rgba(255,255,255,0.9);
  transition: box-shadow .18s ease, transform .12s ease;
}

/* make native <a> look like buttons when using .button-link */
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* share buttons container - stacked on mobile */
.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

/* base frosted button styles (applies to .button-link and #downloadIcs) */
.button-link,
#downloadIcs {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.35));
  border: 1px solid rgba(255,255,255,0.45);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow:
    0 6px 20px rgba(2,6,23,0.06),
    inset 0 1px 0 rgba(255,255,255,0.6);
  cursor: pointer;
  text-align: center;
  color: #111827;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Google (yellowish-orange) - more saturated and warm */
#googleCalLink {
  background: linear-gradient(135deg, rgba(255,243,205,0.65), rgba(255,222,170,0.45));
  border: 1px solid rgba(255,200,80,0.18);
  color: #3b2f00;
  box-shadow:
    0 10px 28px rgba(249, 176, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.65);
}

/* Apple (red + white subtle) */
#downloadIcs {
  background: linear-gradient(135deg, rgba(255,245,245,0.78), rgba(255,230,230,0.55));
  border: 1px solid rgba(220,38,38,0.12);
  color: #6b0b0b;
  box-shadow:
    0 10px 28px rgba(220, 38, 38, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.65);
}

/* subtle hover / press */
#googleCalLink:hover,
#downloadIcs:hover {
  transform: translateY(-4px);
  box-shadow:
    0 16px 36px rgba(2,6,23,0.12),
    inset 0 1px 0 rgba(255,255,255,0.7);
  opacity: 0.98;
}
#googleCalLink:active,
#downloadIcs:active {
  transform: translateY(-1px) scale(.998);
}

/* small-screen side-by-side layout when there's space */
@media (min-width: 560px) {
  .share-buttons {
    flex-direction: row;
  }
  .share-buttons .button-link,
  .share-buttons #downloadIcs {
    flex: 1;
  }
}

/* remaining UI */
.output {
  margin-top: 20px;
  text-align: center;
  color: #065f46;
  font-weight: 700;
}

.subtle {
  display: block;
  margin-top: 18px;
  color: #6b7280;
  font-size: 0.9rem;
  text-decoration: none;
  text-align: center;
}

.event-header {
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap:10px;
  margin-bottom: 10px;
}
.icon-buttons button {
  margin-left: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 1rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
}

/* preserve formatting for description */
.description-pre {
  white-space: pre-wrap;
  background: linear-gradient(180deg, rgba(248,250,252,0.9), rgba(255,255,255,0.75));
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(226,232,240,0.7);
  max-height: 300px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  font-size: 0.95rem;
  color: #0f172a;
}

/* mobile tweaks */
@media (max-width: 480px) {
  .container {
    padding: 18px;
  }
  .event-header { flex-direction: column; align-items: flex-start; }
  .icon-buttons { margin-top: 8px; }
}
