@import "https://unpkg.com/open-props";

/* Simonetta font style */
.simonetta-regular {
  font-family: "Simonetta", serif;
  font-weight: 400;
  font-style: normal;
}

.simonetta-black {
  font-family: "Simonetta", serif;
  font-weight: 900;
  font-style: normal;
}

.simonetta-regular-italic {
  font-family: "Simonetta", serif;
  font-weight: 400;
  font-style: italic;
}

.simonetta-black-italic {
  font-family: "Simonetta", serif;
  font-weight: 900;
  font-style: italic;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base CSS Variables - Mobile First */
:root {
  --magnifier: 1.2;
  --gap: 0.5vmin;
  --transition: 0.3s;
}

body {
  font-family: 'Simonetta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 0;
}

p {
  font-size: var(--font-size-2);
}

.container {
  margin: 0 auto;
}

.page-wrapper {
  max-width: min(90vw, var(--size-content-3));
  margin-inline: auto;
  padding-inline: 1rem;
}

.page-wrapper>* {
  max-width: 100%;
}

/* Event list */
.event-list {
  display: grid;
  gap: 1.5rem;
}


.event-meta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.event-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.stat {
  padding: 0.25rem 0.75rem;
  background-color: #ecf0f1;
  border-radius: 4px;
}

.stat-yes {
  background-color: #d4edda;
  color: #155724;
}

.stat-no {
  background-color: #f8d7da;
  color: #721c24;
}

.stat-maybe {
  background-color: #fff3cd;
  color: #856404;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-weight: 500;
  color: #333;
  font-size: 1rem;
}

.input-group label {
  margin-bottom: 0;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
  background: #fff;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
  color: #999;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/*
Source - https://stackoverflow.com/a/4298216
Posted by antonj, modified by community. See post 'Timeline' for change history
Retrieved 2026-01-08, License - CC BY-SA 4.0
*/

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  /* display: none; <- Crashes Chrome on hover */
  -webkit-appearance: none;
  margin: 0;
  /* <-- Apparently some margin are still there even though it's hidden */
}

input[type=number] {
  -moz-appearance: textfield;
  /* Firefox */
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* Radio buttons */
.radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  background: #fff;
  transition: all 0.2s;
  flex: 0 0 auto;
}

.radio-group label:hover {
  border-color: #3498db;
  background: #f8fbff;
}

.radio-group input[type="radio"] {
  opacity: 0;
  position: fixed;
  width: 0;
}

.radio-group label:has(input[type="radio"]:checked) {
  border-color: #3498db;
  background: #e8f4fd;
  font-weight: 500;
}

/* Buttons */
button,
.button {
  padding: 0.75rem 1.5rem;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

button:hover,
.button:hover {
  background-color: #2980b9;
}

button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

form button[type="submit"] {
  margin-top: 0.5rem;
  align-self: flex-start;
}

.button-secondary {
  background-color: #95a5a6;
}

.button-secondary:hover {
  background-color: #7f8c8d;
}

/* Error messages */
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #f5c6cb;
  margin-bottom: 1rem;
}

.error-list {
  list-style: none;
  margin-top: 0.5rem;
}

.error-list li {
  margin: 0.25rem 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

tr:hover {
  background-color: #f8f9fa;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #7f8c8d;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .event-stats {
    flex-wrap: wrap;
  }

  .radio-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .radio-group label {
    width: 100%;
  }

  table {
    font-size: 0.85rem;
    min-width: 600px;
  }

  th,
  td {
    padding: 0.375rem;
  }
}

/* Header */

.header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-direction: column;

  p {
    align-self: flex-start;
  }
}

.header__title {
  font-size: 2.5rem;
}

.header__image {
  margin: 1rem 0 2rem 0;
  transform: rotate(-0.02turn);
  max-width: 100%;

  img {
    width: 250px;
    max-width: 100%;
    height: auto;
  }
}

/* RSVP section */
.rsvp-container {
  display: flex;
  flex-direction: column;
  align-items: start;
  margin: 3rem 0 2rem;
}

/* Form container */
.form-container {
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  margin-inline: auto;
}

.form-container h2 {
  margin-bottom: 1.5rem;
  color: #333;
  font-size: 1.75rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .rsvp-container {
    margin-top: 2rem;
  }

  .form-container {
    padding: 1.5rem;
    border-radius: 4px;
  }
}

/* rsvp message */
.message__container {
  max-width: var(--size-content-3);
}

/* Add spacing when message appears in header */
.header .message__container {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.message-success {
  background-color: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #c3e6cb;
  margin-bottom: 1rem;
  /* text-align: center; */
}

/* Card component */
.card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .card {
    padding: 1rem;
  }
}

/* Gallery */
.gallery__container {
  width: 100%;

  img {
    width: 200px;
  }
}

/* Update Form Toggle Styling */
.update-form-toggle {
  margin-top: 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.update-form-toggle summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--blue-9);
  list-style: none;
  /* Remove default triangle */
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.update-form-toggle summary::-webkit-details-marker {
  display: none;
  /* Remove default triangle in webkit */
}

/* Add custom icon using ::before */
.update-form-toggle summary::before {
  content: "▼";
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.8em;
}

.update-form-toggle[open] summary::before {
  transform: rotate(180deg);
}

/* Form container inside details */
.update-form-toggle .form-container {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Adjust spacing when details is open */
.update-form-toggle[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  cursor: pointer;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.is-open .lightbox__image {
  transform: scale(1);
}