/* Simple helpers for account routes */
.narrow { max-width: 560px; margin: 32px auto; padding: 0 16px; }
.error { color: #b00020; margin-top: 8px; }
.hidden { display: none; }
.tos { display: inline-block; margin: 12px 0; }

/* Global Styles */
body {
  font-family: "Times New Roman", serif;
  margin: 0 8.5vw;
  padding: 20px;
  background-color: #F5F2E8;
  color: #333;
  text-align: justify;
}

.banner {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  display: block;
  /* Fallback color while SVG loads */
  background-color: #69D0CC;
  background-image: url('Cyber Cola Banner SVG.svg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain; /* preserve intrinsic aspect without distortion */
  aspect-ratio: 1920 / 400; /* keeps shape across breakpoints */
  min-height: 200px; /* ensures reasonable vertical space before image paints */
  height: auto;
}

/* Metadata Bar Styles - Moved from inline */
#metadata-bar {
  display: none;
  margin: 2em 0;
}

#metadata-bar .top-bar,
#metadata-bar .bottom-bar {
  width: 100%;
  height: 4px;
  background-color: #30263A;
}

#metadata-bar .top-bar {
  margin-bottom: 0.75em;
}

#metadata-bar .bottom-bar {
  margin-top: 0.75em;
}

#metadata-bar .content {
  padding: 1.25em 2.5em;
  border-radius: 8px;
  font-size: 1.19em;
  color: #30263A;
}

#metadata-bar .flex-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

#metadata-bar .article-count {
  flex: 0 0 auto;
}

#metadata-bar .date-section {
  flex: 1;
  text-align: center;
}

#metadata-date {
  font-weight: bold;
  font-size: 1.4em;
}

#metadata-bar .time-section {
  flex: 0 0 auto;
  text-align: right;
}

#metadata-read-time {
  margin-right: 1em;
}

/* Cover Article */
.cover-article {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 4px solid #30263A;
}

.cover-article .title {
  font-size: 4.00em !important;
  font-weight: bold;
  font-family: Helvetica, Arial, sans-serif;
  margin-bottom: 5px;
  text-align: center;
}

.cover-article .title a {
  color: #30263A;
  text-decoration: none;
}

.cover-article .meta {
  font-size: 1.02em;
  color: #777;
  margin-bottom: 10px;
  text-align: left;
}

.cover-article .summary,
.cover-article .summary p,
.cover-article .summary .summary-paragraph {
  font-size: 1.10em;
  line-height: 1.4em;
  text-indent: 2em;
  margin-bottom: 0.8em;
  margin-top: 0;
}

.cover-article .summary .summary-paragraph:last-child {
  margin-bottom: 0;
}

/* Masonry Articles */
.articles-masonry {
  column-count: 3;
  column-gap: 22px;
}

.article {
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #30263A;
  background: #F5F2E8;
}

.article .title {
  font-size: 1.75em;
  font-weight: bold;
  font-family: Helvetica, Arial, sans-serif;
  margin: 0 0 8px 0;
  text-align: left;
}

.article .title a {
  color: #30263A;
  text-decoration: none;
}

.article .meta {
  font-size: 1.02em;
  color: #777;
  margin-bottom: 10px;
}

.article .summary {
  font-size: 1.10em;
  line-height: 1.4em;         /* Add missing line-height for proper spacing */
  margin-top: 0.2em;
}

/* Paragraph formatting for summaries */
.summary-paragraph {
  text-indent: 2em;
  margin-bottom: 0.8em;
  margin-top: 0;
}

.summary-paragraph:last-child {
  margin-bottom: 0;
}

/* Footer CTA Section - Moved from inline */
#cta-footer {
  margin: 3em auto;
  padding: 2.5em;
  background: transparent;
  border: 4px solid #69d0cc;
  border-radius: 12px;
  text-align: center;
  max-width: 800px;
  width: 90%;
}

#cta-footer h3 {
  margin: 0 0 0.5em 0;
  font-size: 2.34em;
  font-family: Helvetica, Arial, sans-serif;
}

#cta-footer .article-count {
  color: #32a6a2;
  font-weight: bold;
}

#cta-footer p {
  margin: 0 0 1.5em 0;
  font-size: 1.43em;
  color: #30263A;
}

#cta-footer ul {
  list-style: none;
  padding: 0;
  margin: 1em 0 1.5em 0;
  text-align: left;
  display: inline-block;
}

#cta-footer li {
  margin: 0.5em 0;
  color: #30263A;
  font-size: 1.43em;
}

#cta-footer li:before {
  content: "- ";
  color: #30263A;
  font-weight: normal;
}

/* Subscription Form Styles - Custom Bottle Cap SVG Button */
#subscribe-btn {
  display: inline-block;
  width: 168px;
  height: 168px;
  /* Use relative path so it works in dist root and local preview */
  background: url('Bottle_Cap_Subscribe3.svg?v=1') no-repeat center center;
  background-size: contain;
  border: none;
  cursor: pointer;
  margin: 0.5em;
  padding: 0;
  transition: all 0.3s ease;
  text-indent: -9999px;
  overflow: hidden;
}

#subscribe-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

#subscribe-btn:active {
  transform: scale(0.98);
  filter: brightness(0.9);
}

#subscribe-btn:focus {
  outline: 3px solid #69d0cc;
  outline-offset: 3px;
}

#login-link {
  color: #31a6a2;
  text-decoration: none;
  font-size: 1em;
}

#maintenance-message {
  display: none;
  color: #666;
  margin-top: 1em;
  padding: 1em;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
}

/* Form Styles - Moved from inline */
#signup-form,
#login-form {
  display: none;
  margin-top: 1em;
}

#signup-email,
#signup-password,
#login-email,
#login-password {
  padding: 0.8em;
  margin: 0.5em;
  width: 250px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#signup-submit-btn,
#login-submit-btn {
  padding: 0.8em 2em;
  margin: 0.5em;
  font-size: 1.1em;
  background: #007cba;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#back-to-buttons,
#back-to-buttons-login {
  color: #666;
  text-decoration: none;
  font-size: 0.9em;
}

#signup-error,
#login-error {
  color: red;
  margin-top: 0.5em;
}

/* Disclaimer Section - Moved from inline */
.disclaimer {
  margin: 2em 0 1em 0;
  padding: 1em 2em;
  font-size: 0.85em;
  color: #666;
  line-height: 1.4;
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .articles-masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    margin: 0 4vw;
    padding: 15px;
  }

  /* Banner mobile styles - prevent stretching */
  .banner {
    min-height: 100px;
    max-height: 150px;
    background-size: contain;
    background-position: center center;
  }

  .cover-article .title {
    font-size: 3em !important;
  }

  .articles-masonry {
    column-count: initial !important;
    column-gap: 0 !important;
    display: flex !important;
    flex-direction: column;
  }

  .article {
    break-inside: avoid;
    display: block;
    width: 100%;
  }

  /* Metadata bar responsive styles */
  #metadata-bar {
    margin: 1.5em 0;
  }

  #metadata-bar .content {
    padding: 1em 1.5em;
    font-size: 1.1em;
  }

  #metadata-bar .flex-container {
    flex-direction: column !important;
    gap: 0.75em !important;
    text-align: center !important;
  }
  
  #metadata-bar .article-count,
  #metadata-bar .date-section,
  #metadata-bar .time-section {
    flex: none !important;
    text-align: center !important;
  }

  #metadata-date {
    font-size: 1.2em;
  }

  #metadata-read-time {
    margin-right: 0;
  }

  /* CTA Footer mobile styles */
  #cta-footer {
    margin: 2em auto;
    padding: 1.5em;
    width: 90%;
    max-width: none;
    border-width: 3px;
  }

  #cta-footer h3 {
    font-size: 1.95em;
  }

  #cta-footer p {
    font-size: 1.3em;
  }

  /* Custom subscribe button responsive styles */
  #subscribe-btn {
    width: 140px;
    height: 140px;
  }

  #signup-email,
  #signup-password,
  #login-email,
  #login-password {
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
  }

  /* Disclaimer mobile styles */
  .disclaimer {
    margin: 1.5em 0 1em 0;
    padding: 1em;
    font-size: 0.8em;
  }
}

/* Extra small screens and landscape phones */
@media (max-width: 480px) {
  body {
    margin: 0 2vw;
    padding: 10px;
  }

  #cta-footer {
    margin: 1.5em auto;
    padding: 1.25em;
    width: 85%;
    border-width: 2px;
    border-radius: 8px;
  }

  #cta-footer h3 {
    font-size: 1.7em;
  }

  #cta-footer p {
    font-size: 1.2em;
  }

  #cta-footer li {
    font-size: 1.25em;
  }
}

/* Account Management Section for /large page - styled like CTA footer */
#account-section {
  margin: 3em auto 2em auto;
  padding: 0.5em 0 0.5em 0; /* slimmer now that box removed */
  background: none; /* remove transparent rectangle */
  border: none; /* remove teal outline */
  text-align: center;
  max-width: 800px;
  width: 100%;
}

#account-section button {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 1.05rem;
  line-height: 1.2;
  padding: 0.95em 2.2em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  color: #F5F2E8; /* off-white text like main */
  transition: background-color 0.25s ease, transform 0.2s ease;
  margin: 0.5em 0.85em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

/* Manage Account (primary) */
#manage-account-btn {
  background-color: #69d0cc; /* requested teal */
}
#manage-account-btn:hover {
  background-color: #55bbb7;
  transform: translateY(-2px);
}
#manage-account-btn:active {
  background-color: #3fa5a1;
  transform: translateY(0);
}

/* Logout (secondary / warning) */
#logout-btn {
  background-color: #ff3131; /* requested red */
}
#logout-btn:hover {
  background-color: #e02020; /* darker hover */
  transform: translateY(-2px);
}
#logout-btn:active {
  background-color: #c40000; /* deeper active */
  transform: translateY(0);
}

/* Focus styles for accessibility */
#account-section button:focus-visible {
  outline: 3px solid #30263A;
  outline-offset: 3px;
}