/* Shared legal pages + cookie banner base */
.legal-page {
  font-family: 'Inter', system-ui, sans-serif;
  background: #FAFAFA;
  color: #0F172A;
  min-height: 100vh;
}

.legal-header {
  background: #FFFFFF;
  border-bottom: 1px solid #DDE1E6;
  position: sticky;
  top: 0;
  z-index: 40;
}

.legal-header-inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.legal-back {
  font-size: 0.875rem;
  color: #2563EB;
  text-decoration: none;
  font-weight: 500;
}

.legal-back:hover {
  text-decoration: underline;
}

.legal-main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.legal-main h1 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #DDE1E6;
}

.legal-main h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-main h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-main p,
.legal-main li {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 0.75rem;
}

.legal-main ul,
.legal-main ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-main a {
  color: #2563EB;
  text-decoration: underline;
}

.legal-main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin: 1rem 0 1.5rem;
}

.legal-main th,
.legal-main td {
  border: 1px solid #DDE1E6;
  padding: 0.625rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal-main th {
  background: #F1F5F9;
  font-weight: 600;
  color: #0F172A;
}

.legal-footer {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid #DDE1E6;
  font-size: 0.8125rem;
  color: #64748B;
  text-align: center;
}

.legal-footer a {
  color: #2563EB;
  margin: 0 0.5rem;
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
}

.legal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin: 1rem 0;
}

.legal-footer-company {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #64748B;
  margin: 0.75rem 0 1rem;
}

.legal-footer-company p {
  margin: 0.2rem 0;
}

.legal-footer-company strong {
  color: #0F172A;
  font-weight: 600;
}

.legal-footer-company a {
  margin: 0;
}

.legal-footer-copy {
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

.site-footer-company {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #64748B;
  text-align: center;
}

.site-footer-company p {
  margin: 0.2rem 0;
}

.site-footer-company a {
  color: #2563EB;
  text-decoration: none;
}

.site-footer-company a:hover {
  text-decoration: underline;
}

/* Cookie banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #FFFFFF;
  border-top: 1px solid #DDE1E6;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 1.25rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

#cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-banner-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #334155;
  flex: 1;
}

.cookie-banner-text a {
  color: #2563EB;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease;
}

.cookie-btn-primary {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

.cookie-btn-primary:hover {
  background: #1d4ed8;
}

.cookie-btn-secondary {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #DDE1E6;
}

.cookie-btn-secondary:hover {
  background: #F1F5F9;
}

.cookie-btn-ghost {
  background: transparent;
  color: #2563EB;
  border-color: #DDE1E6;
}

.cookie-btn-ghost:hover {
  background: #F1F5F9;
}

/* Cookie settings modal */
#cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#cookie-modal-overlay.is-open {
  display: flex;
}

#cookie-modal {
  background: #FFFFFF;
  border-radius: 0.75rem;
  border: 1px solid #DDE1E6;
  max-width: 28rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.cookie-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #DDE1E6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748B;
  padding: 0.25rem;
}

.cookie-modal-body {
  padding: 1.25rem 1.5rem;
}

.cookie-category {
  padding: 1rem 0;
  border-bottom: 1px solid #DDE1E6;
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cookie-category-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
}

.cookie-category p {
  font-size: 0.8125rem;
  color: #64748B;
  margin: 0.375rem 0 0;
  line-height: 1.5;
}

.cookie-toggle {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: #DDE1E6;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  width: 1.125rem;
  height: 1.125rem;
  left: 0.1875rem;
  bottom: 0.1875rem;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #2563EB;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(1.25rem);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-modal-footer {
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid #DDE1E6;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.cookie-tag-unused {
  font-size: 0.6875rem;
  color: #64748B;
  background: #F1F5F9;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
}
