:root {
  --bg-color: #f4f4f4;
  --page-bg: #ffffff;
  --border-color: #cccccc;
  --accent: #ffc72c; /* Mustard Yellow */
  --primary: #da291c; /* Ketchup Red */
  --text-primary: #333333;
  --text-secondary: #666666;
  --link-color: #da291c; /* Red links */
  --font-family: Arial, Verdana, Tahoma, sans-serif;
  --header-font: "Comic Neue", "Chalkboard SE", "Comic Sans MS", "Comic Sans", cursive;
}

/* Sticker base styling */
.sticker {
  position: absolute;
  z-index: 100;
  pointer-events: none;
  filter: drop-shadow(3px 3px 2px rgba(0,0,0,0.25));
  max-width: 80px;
  height: auto;
  transition: transform 0.3s ease;
}

.sticker.s1 {
  top: -20px;
  left: -20px;
  transform: rotate(-12deg);
}

.sticker.s2 {
  top: 15%;
  right: -15px;
  transform: rotate(8deg);
  max-width: 60px;
}

.sticker.s3 {
  bottom: 20px;
  right: 10px;
  transform: rotate(-5deg);
  max-width: 70px;
}

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

body {
  background-color: var(--bg-color);
  background-image: url('../bg_texture.png');
  background-repeat: repeat;
  background-size: 150px; /* Denser tiling */
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  padding: 3rem 0;
  line-height: 1.5;
}

/* Background aesthetic - removed blobs */
.background-blobs {
  display: none;
}

.container {
  width: 95%;
  max-width: 650px;
  margin: 0 auto;
  background: var(--page-bg);
  border: 2px solid var(--primary); /* Red border */
  border-radius: 8px;
  padding: 1.5rem 2.5rem 2.5rem 2.5rem; /* Reduced top padding */
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
  position: relative;
}

header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed var(--accent); /* Yellow dashed line */
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
}

.logo .icon {
  font-size: 1.75rem;
}

h1 {
  font-family: var(--header-font);
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-family: var(--header-font);
  text-align: center; /* Centered */
}

.admin-link {
  color: inherit;
  text-decoration: none;
  cursor: default;
}

.admin-link:hover {
  color: inherit;
  text-decoration: none;
}

.top-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.top-icon-wrapper img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

/* Card Styles */
.card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.date-badge {
  display: block;
  color: var(--primary);
  font-family: var(--header-font);
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

h2 {
  font-family: var(--header-font);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
  background: #fffdf0; /* Light yellow tint */
  padding: 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dotted #dddddd;
  padding-bottom: 0.5rem;
}

.detail-item:last-child {
  border-bottom: none;
}

.label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.value {
  font-size: 1rem;
  font-weight: 400;
}

/* Button Styles - Web 2.0 Glossy with McDonald's Colors */
.btn {
  display: inline-block;
  width: 100%;
  padding: 0.8rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-family: var(--header-font);
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.1s ease;
  border: 2px solid #bb0000;
}

.btn.primary {
  background: linear-gradient(to bottom, #ffeb3b 0%, #ffc107 100%); /* Yellow gradient */
  color: #8b0000;
  box-shadow: 0 4px 0 #bb0000;
  margin-bottom: 4px;
}

.btn.primary:hover {
  background: linear-gradient(to bottom, #fff176 0%, #ffca28 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #bb0000;
}

.btn.primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #bb0000;
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: #999;
  border-top: 1px solid #eeeeee;
}

.privacy-note {
  font-style: italic;
  font-family: var(--header-font);
}

/* Custom link styling */
a {
  color: var(--link-color);
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
  color: var(--accent);
}

/* Loading state */
.loading {
  opacity: 0.6;
}

.notify-container {
  margin-top: 1.5rem;
}

.action-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap; /* Prevent wrapping on desktop/large mobile */
}

.form-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.form-row > * {
  min-width: 0;
  overflow: hidden;
}

/* Add to Calendar Button Customization */
add-to-calendar-button {
  --atcb-font-family: var(--font-family);
  --atcb-button-font-size: 0.8rem;
  --atcb-button-padding: 0.5rem 1rem;
  --atcb-button-background: #f8f8f8;
  --atcb-button-text: #666;
  --atcb-button-border: #dddddd;
  --atcb-button-background-hover: #eeeeee;
  --atcb-button-text-hover: var(--primary);
  --atcb-button-border-hover: #cccccc;
  --atcb-button-border-radius: 8px;
  --atcb-button-box-shadow: none;
  --atcb-button-box-shadow-hover: none;
}

.btn.secondary.small {
  background: #f8f8f8;
  color: #666;
  font-size: 0.8rem;
  padding: 0.5rem 1rem; /* Matched padding */
  width: auto;
  border: 1px solid #dddddd;
  font-family: var(--font-family);
  box-shadow: none;
  margin-bottom: 0; /* Clear any margin */
}

.btn.secondary.small:hover {
  background: #eeeeee;
  color: var(--primary);
}

.notify-status {
  font-size: 0.8rem;
  color: var(--primary);
  font-family: var(--header-font);
  margin-top: 0.5rem;
  min-height: 1.2rem;
}

/* iOS Instructions - Collapsible */
.ios-instructions {
  margin-top: 1rem;
  padding: 0.5rem 1rem; /* Reduced */
  background: #fff9e6;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  text-align: left;
  transition: all 0.3s ease;
}

.ios-instructions summary {
  font-family: var(--header-font);
  font-size: 0.85rem;
  color: var(--primary);
  text-transform: uppercase;
  cursor: pointer;
  list-style: none; /* Hide default arrow */
  display: flex;
  align-items: center;
  gap: 0.4rem;
  outline: none;
}

.ios-instructions summary::-webkit-details-marker {
  display: none;
}

.ios-instructions summary:hover {
  color: #8b0000;
}

.ios-instructions ol {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px dotted var(--accent);
  padding-top: 0.5rem;
}

.ios-instructions li {
  margin-bottom: 0.4rem;
}

.ios-instructions strong {
  color: var(--text-primary);
}

/* Mobile optimizations */
@media (max-width: 480px) {
  body {
    padding: 2.25rem 0 0.5rem 0; /* Plenty of room for top sticker */
  }
  .container {
    padding: 1rem; /* Reduced */
    width: 92%; /* Slightly narrower to show more background */
    margin-top: 2rem; /* Give top sticker room to breathe */
  }
  .top-icon-wrapper {
    margin-bottom: 0.5rem;
  }
  .top-icon-wrapper img {
    width: 45px;
    height: 45px;
  }
  header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
  }
  h1 {
    font-size: 1.8rem;
  }
  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }
  .details {
    padding: 0.6rem 0.75rem; /* Reduced */
    gap: 0.4rem; /* Reduced */
    margin-bottom: 0.8rem; /* Reduced */
  }
  .detail-item {
    flex-direction: row; /* Keep row-based to save vertical space */
    justify-content: space-between;
    font-size: 0.9rem;
  }
  .label {
    font-size: 0.7rem;
  }
  .value {
    font-size: 0.9rem;
    text-align: right; /* Right align for better spacing */
    flex: 1; /* Take up available space */
    margin-left: 1rem; /* Gap between label and value */
  }
  .action-buttons {
    gap: 6px; /* Tighter gap on mobile */
    flex-wrap: nowrap; /* Force side-by-side */
    width: 100%;
    display: flex;
  }
  .action-buttons > * {
    flex: 1 !important; /* Force equal sharing */
    min-width: 0; /* Allow shrinking */
  }
  #subscribe-btn {
    margin: 0;
  }
  #calendar-btn-container {
    flex: 1; /* Share space */
    margin: 0;
  }
  .btn.secondary.small {
    padding: 0.5rem 0.4rem; /* Even tighter padding for PWA safety */
    font-size: 0.75rem; /* Smaller font */
    width: 100%; /* Fill flex child */
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  add-to-calendar-button {
    --atcb-button-padding: 0.5rem 0.6rem;
    --atcb-button-font-size: 0.75rem;
    width: 100%;
  }

  /* Form row layout — stays side-by-side, never stacks */
  .form-row {
    grid-template-columns: 1.25fr 1fr;
    gap: 8px;
  }

  .form-row > * {
    min-width: 0;
    overflow: hidden;
  }

  .ios-instructions {
    margin-top: 0.75rem;
    padding: 0.4rem 0.75rem;
  }
  .ios-instructions summary {
    font-size: 0.75rem;
  }
  .ios-instructions ol {
    font-size: 0.7rem;
    padding-top: 0.4rem;
  }
  .sticker {
    max-width: 50px; /* Scale down stickers for mobile */
  }
  .sticker.s1 {
    top: -5px; /* Moved down to avoid clipping */
    left: -15px;
  }
  .sticker.s2 {
    right: -12px;
  }
  .sticker.s3 {
    bottom: 10px;
    right: -5px;
  }
}

