/* ========================================
   POLICY DOCUMENTS - CENTRAL BRANDING
   Update variables below for rebranding
   ======================================== */

:root {
  /* PRIMARY BRAND COLORS - CHANGE THESE FOR REBRANDING */
  --primary-bg: #fafafa;
  --secondary-bg: #ffffff;
  --text-color: #000000;
  --border-color: #f0f0f0;
  --link-color: #000000;
  --accent-color: #FD5108;
  
  /* TYPOGRAPHY */
  --font-family: 'Helvetica Neue', Arial, sans-serif;
  --font-size-body: 16px;
  --font-size-h1: 28px;
  --font-size-h2: 18px;
  --line-height: 1.3;
  
  /* LAYOUT & SPACING */
  --max-width: 1200px;
  --page-width: 85%;
  --padding-large: 4em;
  --padding-medium: 2em;
  --padding-small: 1em;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--primary-bg);
  color: var(--text-color);
  padding-top: 3em;
  overflow-x: auto;
}

main {
  width: var(--page-width);
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 2em;
}

.content-wrapper {
  background-color: var(--secondary-bg);
  border: 1px solid var(--border-color);
  padding: var(--padding-large);
  line-height: var(--line-height);
}

/* HEADER SECTION */
.document-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2em;
  padding-bottom: 1em;
}

.document-header .logo img {
  height: 50px;
  width: auto;
}

.document-header .last-updated {
  font-size: var(--font-size-body);
  color: var(--text-color);
}

/* HEADINGS */
h1 {
  font-size: var(--font-size-h1);
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 1.5em;
  line-height: 1;
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: bold;
  color: var(--text-color);
  margin-top: 2em;
  margin-bottom: 1.5em;
  line-height: 1.2;
}

h3 {
  font-size: var(--font-size-body);
  font-weight: bold;
  color: var(--text-color);
  margin-top: 1.5em;
  margin-bottom: 1em;
}

/* PARAGRAPHS & TEXT */
p {
  font-size: var(--font-size-body);
  color: var(--text-color);
  margin-bottom: 1.5em;
  line-height: var(--line-height);
}

/* LINKS */
a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px solid var(--link-color);
}

a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

a:visited {
  color: var(--link-color);
}

/* LISTS */
ul, ol {
  margin-top: 1em;
  margin-bottom: 1.5em;
  margin-left: 2em;
}

ul li, ol li {
  margin-bottom: 0.75em;
  line-height: var(--line-height);
}

/* NESTED LISTS */
ul ul, ol ol, ul ol, ol ul {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  margin-left: 1.5em;
}

/* TABLES */
.cookie-table {
  border-collapse: collapse;
  margin: 2em 0;
  width: 100%;
}

.cookie-table thead tr {
  background-color: var(--accent-color);
  color: var(--text-color);
  text-align: left;
  vertical-align: center;
}

.cookie-table th,
.cookie-table td {
  padding: 12px 15px;
  font-size: var(--font-size-body);
}

.cookie-table tbody tr {
  border-bottom: 1px solid var(--border-color);
}

.cookie-table tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

.cookie-table tbody tr:last-of-type {
  border-bottom: 2px solid var(--accent-color);
}

/* FOOTER */
footer {
  padding-top: 2em;
  color: var(--text-color);
  font-size: 14px;
}

footer p {
  margin-bottom: 0;
}

/* UTILITY CLASSES */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.spacer-small {
  margin-bottom: 1em;
}

.spacer-medium {
  margin-bottom: 2em;
}

.spacer-large {
  margin-bottom: 3em;
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  :root {
    --font-size-body: 14px;
    --font-size-h1: 24px;
    --font-size-h2: 16px;
    --padding-large: 2em;
  }
  
  main {
    width: 95%;
  }
  
  .document-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .document-header .last-updated {
    margin-top: 1em;
  }
}

@media (max-width: 480px) {
  :root {
    --padding-large: 1.5em;
  }
  
  main {
    width: 100%;
    padding: 1em;
  }
  
  .content-wrapper {
    padding: var(--padding-large);
  }
}

/* TABLE RESPONSIVENESS */
@media (max-width: 768px) {
  .cookie-table {
    display: block;
    width: 100%;
  }

  .cookie-table thead {
    display: none;
  }

  .cookie-table tbody {
    display: block;
    width: 100%;
  }

  .cookie-table tr {
    display: block;
    margin-bottom: 1.5em;
    border: 1px solid var(--border-color);
    padding: 0;
    width: 100%;
    background-color: var(--secondary-bg);
  }

  .cookie-table td {
    display: block;
    padding: 1em;
    border: none;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .cookie-table tbody tr:nth-of-type(even) {
    background-color: #ffffff;
    padding-bottom: 1em;
  }
    
  .cookie-table tbody tr:nth-of-type(odd) {
    padding-bottom: 1em;
  }

  /* First cell (Cookie Name) */
  .cookie-table td:nth-child(1) {
    background-color: #f3f3f3;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75em;
  }

  /* Second cell (Purpose) */
  .cookie-table td:nth-child(2) {
    background-color: #fff;
    padding-top: 0.75em;
    padding-bottom: 0.75em;
  }

  /* Third & Fourth cells (Type and Expires combined) */
  .cookie-table td:nth-child(3),
  .cookie-table td:nth-child(4) {
    display: inline-block;
    padding: 0 0 0em 1em;
    width: auto;
    font-style: italic;
    font-size: --font-size-body;
    background-color: #fff;
  }

    .cookie-table td:nth-child(4) {
    display: inline;
    padding: 0;
    padding-right: 1em;
    background-color: #fff;
  }

  .cookie-table td:nth-child(3)::after {
    content: " - ";
    background-color: #fff;
  }

  .cookie-table td:nth-child(3)::before {
    content: "";
    background-color: #fff;
  }

  .cookie-table td:nth-child(4) {
    font-style: italic;  
    background-color: #fff;  
  }

  .cookie-table td:nth-child(4)::before {
    content: "";    
    background-color: #fff;
  }

  .cookie-table td:nth-child(3),
  .cookie-table td:nth-child(4) {
    color: var(--text-color);
  }
}