/* =====================================================
   MICHOT — LEGAL.CSS
   File: /public/css/legal.css

   PURPOSE:
   - Legal pages only
   - Terms of Service
   - Privacy Policy
   - Community Guidelines
   - Safety Policy
   - Driver Agreement
   - Legal notices

   IMPORTANT:
   - Keep this file separate from /public/css/styles.css.
   - Legal pages should load styles.css first, then legal.css.
===================================================== */

/* =====================================================
   BASE
===================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --michot-blue: #0f5fc9;
  --michot-blue-dark: #0b4fa8;
  --michot-text: #101114;
  --michot-muted: #5f6673;
  --michot-border: #e4e8f0;
  --michot-soft: #f6f9ff;
  --michot-card: #ffffff;
  --michot-warning: #b42318;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #ffffff;
  color: var(--michot-text);
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =====================================================
   LEGAL PAGE LAYOUT
===================================================== */

.legal-page {
  flex: 1;
  padding-top: 96px;
  background:
    radial-gradient(circle at top left, rgba(15, 95, 201, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.legal {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 96px;
}

.legal__header {
  max-width: 850px;
  margin: 0 auto 42px;
  text-align: center;
}

.legal__header h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.06em;
  color: var(--michot-text);
  margin-bottom: 18px;
}

.legal__header p {
  color: var(--michot-muted);
  font-size: 17px;
  line-height: 1.65;
  margin: 6px auto 0;
}

/* =====================================================
   LEGAL CARD CONTENT
===================================================== */

.legal__card {
  max-width: 980px;
  margin: 0 auto;
}

.legal__card > h2,
.legal__card > h3,
.legal__card > p,
.legal__card > ul,
.legal__card > ol,
.legal__card > .legal-notice,
.legal__card > .legal-warning,
.legal__card > .legal-table-wrap,
.legal__card > .back {
  background: var(--michot-card);
  border-left: 1px solid var(--michot-border);
  border-right: 1px solid var(--michot-border);
  padding-left: 34px;
  padding-right: 34px;
}

.legal__card > h2 {
  margin-top: 26px;
  padding-top: 30px;
  padding-bottom: 8px;
  border-top: 1px solid var(--michot-border);
  border-radius: 22px 22px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.035em;
  color: var(--michot-text);
}

.legal__card > h2:first-child {
  margin-top: 0;
}

.legal__card > h3 {
  padding-top: 18px;
  padding-bottom: 6px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 900;
  color: var(--michot-text);
}

.legal__card > p {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 16px;
  line-height: 1.75;
  color: #2f3540;
}

.legal__card > ul,
.legal__card > ol {
  padding-top: 10px;
  padding-bottom: 18px;
  padding-left: 58px;
}

.legal__card li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.65;
  color: #2f3540;
}

.legal__card strong {
  color: var(--michot-text);
  font-weight: 900;
}

.legal__card a,
.legal__card .link {
  color: var(--michot-blue);
  font-weight: 850;
  text-decoration: none;
}

.legal__card a:hover,
.legal__card .link:hover {
  text-decoration: underline;
}

.legal__card > p:last-child,
.legal__card > ul:last-child,
.legal__card > ol:last-child,
.legal__card > .legal-table-wrap:last-child,
.legal__card > .back:last-child {
  border-bottom: 1px solid var(--michot-border);
  border-radius: 0 0 22px 22px;
  padding-bottom: 30px;
}

/* =====================================================
   LEGAL NOTICE BOXES
===================================================== */

.legal-notice,
.legal-warning {
  margin: 0;
  padding-top: 22px !important;
  padding-bottom: 22px !important;
  border-left: 5px solid var(--michot-blue) !important;
  background: #eef5ff !important;
}

.legal-warning {
  border-left-color: var(--michot-warning) !important;
  background: #fff5f5 !important;
}

.legal-notice p,
.legal-warning p {
  margin: 0;
  color: #2f3540;
  font-size: 15.5px;
  line-height: 1.7;
}

/* =====================================================
   LEGAL TABLES
===================================================== */

.legal-table-wrap {
  overflow-x: auto;
  margin: 0;
  padding-top: 20px;
  padding-bottom: 20px;
}

.legal-table-wrap table,
.legal__card table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  overflow: hidden;
  border: 1px solid var(--michot-border);
  border-radius: 14px;
}

.legal__card th,
.legal__card td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--michot-border);
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  color: #2f3540;
}

.legal__card th {
  background: var(--michot-soft);
  color: var(--michot-text);
  font-weight: 900;
}

.legal__card tr:last-child td {
  border-bottom: none;
}

/* =====================================================
   BACK / END LINK
===================================================== */

.back {
  margin-top: 26px;
  padding-top: 22px !important;
  border-top: 1px solid var(--michot-border);
}

/* =====================================================
   FOOTER SOCIAL CENTER FIX
===================================================== */

.footer-social {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 18px !important;
  margin: 34px auto 26px !important;
  text-align: center !important;
  flex-wrap: wrap !important;
}

.footer-social .social-circle,
.footer-social a {
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  background: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 42px !important;
}

.footer-social .social-circle img,
.footer-social img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
  display: block !important;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 760px) {
  .legal {
    width: min(100% - 24px, 1180px);
    padding: 58px 0 72px;
  }

  .legal__header {
    text-align: left;
  }

  .legal__header h1 {
    font-size: 42px;
  }

  .legal__header p {
    font-size: 15.5px;
  }

  .legal__card > h2,
  .legal__card > h3,
  .legal__card > p,
  .legal__card > ul,
  .legal__card > ol,
  .legal__card > .legal-notice,
  .legal__card > .legal-warning,
  .legal__card > .legal-table-wrap,
  .legal__card > .back {
    padding-left: 22px;
    padding-right: 22px;
  }

  .legal__card > h2 {
    font-size: 24px;
    border-radius: 18px 18px 0 0;
  }

  .legal__card > h3 {
    font-size: 18px;
  }

  .legal__card > ul,
  .legal__card > ol {
    padding-left: 42px;
  }

  .legal__card > p,
  .legal__card li {
    font-size: 15px;
  }

  .footer-social {
    gap: 14px !important;
  }
}

/* =====================================================
   PRINT STYLE
===================================================== */

@media print {
  .navbar,
  .footer {
    display: none !important;
  }

  body {
    display: block;
    color: #000;
    background: #fff;
  }

  .legal-page {
    padding-top: 0;
    background: #fff;
  }

  .legal {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .legal__header {
    text-align: left;
    margin-bottom: 20px;
  }

  .legal__header h1 {
    font-size: 28px;
    letter-spacing: 0;
  }

  .legal__header p {
    font-size: 12px;
    color: #000;
  }

  .legal__card {
    max-width: none;
  }

  .legal__card > * {
    border: none !important;
    background: #fff !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .legal__card h2 {
    font-size: 18px;
    margin-top: 18px;
    padding-top: 0;
  }

  .legal__card h3 {
    font-size: 15px;
  }

  .legal__card p,
  .legal__card li,
  .legal__card th,
  .legal__card td {
    font-size: 12px;
    line-height: 1.5;
    color: #000;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}
