/**
 * AroundManchester.com - Terms of Service Page Stylesheet
 * Styles specific to terms-of-service.html
 * WCAG 2.2 AA Compliant
 * 
 * @charset UTF-8
 * @author AroundManchester.com Development Team
 * @version 1.1
 */

@charset "UTF-8";

/* ===== COMPACT HEADER DESCRIPTION ===== */
.site-header__description {
  line-height: 1.3;
  padding: 4px 12px;
  margin: 4px auto 0;
}

.site-header__description > p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25;
}

/* ===== TERMS OF SERVICE PAGE ===== */
.terms-of-service {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  background: #f5f5f5;
}

/* ===== TERMS OF SERVICE HEADER ===== */
.terms-of-service__header {
  background: linear-gradient(135deg, #4a6bb5, #3a5a95);
  color: white;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 40px;
  border-radius: 8px;
}

.terms-of-service__title {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

/* WCAG 2.2 AA: Removed opacity to ensure sufficient color contrast */
.terms-of-service__updated {
  font-size: 1rem;
  color: #e8edf5;
}

.terms-of-service__updated time {
  color: inherit;
}

/* ===== TERMS OF SERVICE SECTIONS ===== */
.terms-of-service__section {
  background: white;
  padding: 30px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.terms-of-service__section h3 {
  color: #4a6bb5;
  font-size: 1.8rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.terms-of-service__section h4 {
  color: #3a5a95;
  font-size: 1.3rem;
  margin-top: 20px;
  margin-bottom: 10px;
}

.terms-of-service__section p {
  line-height: 1.6;
  margin-bottom: 15px;
  color: #333;
}

.terms-of-service__section ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.terms-of-service__section li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ===== TERMS OF SERVICE CONTACT ===== */
.terms-of-service__contact {
  background: #e8f4f8;
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

/* Contact grid styles (replacing inline styles) */
.terms-of-service__contact-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
}

.terms-of-service__contact-grid dt {
  font-weight: 600;
}

.terms-of-service__contact-grid dd {
  margin: 0;
}

/* ===== TERMS OF SERVICE EMAIL REVEAL ===== */
.terms-of-service__reveal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.terms-of-service__reveal-btn {
  background: transparent;
  color: #4a6bb5;
  border: 2px dashed #4a6bb5;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* WCAG 2.2 AA: Enhanced focus and hover states */
.terms-of-service__reveal-btn:hover {
  background: #f0f4f8;
  border-style: solid;
}

.terms-of-service__reveal-btn:focus {
  outline: 3px solid #2a4a85;
  outline-offset: 2px;
  background: #f0f4f8;
  border-style: solid;
}

.terms-of-service__reveal-btn:focus-visible {
  outline: 3px solid #2a4a85;
  outline-offset: 2px;
  background: #f0f4f8;
  border-style: solid;
}

.terms-of-service__hidden {
  display: none;
}

.terms-of-service__hidden.revealed {
  display: inline;
}

.terms-of-service__email-link {
  color: #4a6bb5;
  text-decoration: underline;
  font-weight: 600;
}

.terms-of-service__email-link:hover {
  color: #3a5a95;
}

.terms-of-service__email-link:focus {
  outline: 3px solid #2a4a85;
  outline-offset: 2px;
}

/* WCAG 2.2 AA: Improved color contrast for note text */
.terms-of-service__note {
  font-size: 0.9rem;
  color: #555;
  margin-top: 10px;
}

.terms-of-service__note a {
  color: #4a6bb5;
}

.terms-of-service__note a:focus {
  outline: 3px solid #2a4a85;
  outline-offset: 2px;
}

/* ===== TERMS OF SERVICE BACK LINK ===== */
.terms-of-service__back-link {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 20px;
}

.terms-of-service__back-link .button:focus {
  outline: 3px solid #2a4a85;
  outline-offset: 2px;
}

/* ===== WCAG 2.2 AA: Focus Indicators ===== */
.terms-of-service a:focus,
.terms-of-service button:focus {
  outline: 3px solid #2a4a85;
  outline-offset: 2px;
}

.terms-of-service a:focus:not(:focus-visible),
.terms-of-service button:focus:not(:focus-visible) {
  outline: none;
}

.terms-of-service a:focus-visible,
.terms-of-service button:focus-visible {
  outline: 3px solid #2a4a85;
  outline-offset: 2px;
}


/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
  .terms-of-service__title {
    font-size: 2rem;
  }

  .terms-of-service__section h3 {
    font-size: 1.5rem;
  }
  
  .terms-of-service__contact-grid {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  
  .terms-of-service__contact-grid dt {
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .terms-of-service__title {
    font-size: 1.6rem;
  }

  .terms-of-service {
    padding: 20px 10px;
  }

  .terms-of-service__section {
    padding: 20px;
  }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .terms-of-service__reveal-btn {
    transition: none;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
/*
 * High contrast overrides for accessibility and e-ink devices.
 * Applied when .high-contrast class is on <html> element.
 */
.high-contrast .terms-of-service {
  background: #ffffff;
}

.high-contrast .terms-of-service__header {
  background: #000000;
  color: #ffffff;
  border: 3px solid #000000;
}

.high-contrast .terms-of-service__title {
  color: #ffffff;
}

.high-contrast .terms-of-service__updated {
  color: #ffffff;
}

.high-contrast .terms-of-service__section {
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: none;
}

.high-contrast .terms-of-service__section h3 {
  color: #000000;
  border-bottom-color: #000000;
}

.high-contrast .terms-of-service__section h4 {
  color: #000000;
}

.high-contrast .terms-of-service__section p {
  color: #000000;
}

.high-contrast .terms-of-service__section ul,
.high-contrast .terms-of-service__section li {
  color: #000000;
}

.high-contrast .terms-of-service__section a {
  color: #000000;
  text-decoration: underline;
}

.high-contrast .terms-of-service__contact {
  background: #ffffff;
  border: 2px solid #000000;
}

.high-contrast .terms-of-service__contact-grid dt,
.high-contrast .terms-of-service__contact-grid dd {
  color: #000000;
}

.high-contrast .terms-of-service__reveal-btn {
  background: #ffffff;
  color: #000000;
  border: 2px dashed #000000;
}

.high-contrast .terms-of-service__reveal-btn:hover,
.high-contrast .terms-of-service__reveal-btn:focus {
  background: #f0f0f0;
  border-style: solid;
}

.high-contrast .terms-of-service__email-link {
  color: #000000;
}

.high-contrast .terms-of-service__email-link:hover {
  color: #000000;
}

.high-contrast .terms-of-service__note {
  color: #000000;
}

.high-contrast .terms-of-service__note a {
  color: #000000;
}

/* High contrast focus indicators */
.high-contrast .terms-of-service :focus-visible {
  outline: 3px solid #000000 !important;
  outline-offset: 2px !important;
}

.high-contrast .terms-of-service__header :focus-visible {
  outline: 3px solid #ffffff !important;
  outline-offset: 2px !important;
}
