/* ==========================================================
   DESIGNWEBY.CZ — WIDERRUFSBELEHRUNG
   ICE SILVER + SAPPHIRE BLUE / DARK PURPLE + GOLD
========================================================== */

#main-content {
  background: #f2f4f7;
  padding: 35px 20px 65px;
  min-height: 70vh;
}

#main-content *,
#main-content *::before,
#main-content *::after {
  box-sizing: border-box;
}

#main-content .container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

/* ==========================================================
   HERO
========================================================== */

#main-content .legal-hero {
  padding: 15px 0 30px;
}

#main-content .legal-hero .container {
  max-width: 820px;
  background: #ffffff;
  border: 1px solid #e5e8ec;
  border-radius: 18px;
  padding: 38px 32px;
  text-align: center;
  box-shadow: 0 10px 32px rgba(0, 40, 90, 0.10);
}

#main-content .legal-hero h1 {
  margin: 0 0 18px;
  color: #0044cc;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-shadow: 0 0 12px rgba(0, 102, 255, 0.12);
}

#main-content .legal-hero p {
  max-width: 700px;
  margin: 0 auto;
  color: #1a2a44;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ==========================================================
   LEGAL CONTENT
========================================================== */

#main-content .legal-content {
  padding: 0;
}

#main-content .legal-section {
  background: #ffffff;
  border: 1px solid #e5e8ec;
  border-radius: 18px;
  padding: 32px 36px;
  margin-bottom: 25px;
  box-shadow: 0 10px 35px rgba(0, 40, 90, 0.10);
}

#main-content .legal-section h2 {
  color: #0044cc;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 24px;
  overflow-wrap: anywhere;
}

#main-content .legal-section p {
  color: #1a2a44;
  font-size: 1.06rem;
  line-height: 1.85;
  margin: 0 0 18px;
  overflow-wrap: break-word;
}

#main-content .legal-section p:last-child {
  margin-bottom: 0;
}

/* ==========================================================
   ADDRESS / CONTACT
========================================================== */

#main-content .legal-section address {
  display: block;
  max-width: 100%;
  margin: 22px 0;
  padding: 22px 26px;
  background: #f5f8ff;
  border: 1px solid #dce6fa;
  border-left: 4px solid #0044cc;
  border-radius: 12px;
  color: #1a2a44;
  font-size: 1.04rem;
  font-style: normal;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

#main-content .legal-section address strong {
  color: #0044cc;
  font-weight: 700;
}

#main-content .legal-section a,
#main-content .legal-related a {
  color: #0066ff;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

#main-content .legal-section a:hover,
#main-content .legal-related a:hover {
  color: #0044cc;
  text-decoration: underline;
}

/* ==========================================================
   MUSTER-WIDERRUFSFORMULAR
========================================================== */

#main-content .legal-form-template {
  background: #f8faff;
  border: 1px solid #dce6fa;
  border-radius: 16px;
  padding: 30px;
  margin-top: 25px;
  overflow-wrap: anywhere;
}

#main-content .legal-form-template > p {
  margin-bottom: 12px;
}

#main-content .legal-form-template > p + p {
  margin-bottom: 24px;
}

#main-content .legal-form-template address {
  background: #ffffff;
  margin: 14px 0 28px;
}

#main-content .legal-form-template small {
  display: block;
  color: #52627a;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 22px;
}

/* ==========================================================
   RELATED LINKS
========================================================== */

#main-content .legal-related {
  background: #ffffff;
  border: 1px solid #e5e8ec;
  border-radius: 18px;
  padding: 30px 36px;
  margin-top: 30px;
  text-align: center;
  box-shadow: 0 10px 35px rgba(0, 40, 90, 0.10);
}

#main-content .legal-related h2 {
  color: #0044cc;
  font-size: 1.65rem;
  line-height: 1.4;
  margin: 0 0 20px;
}

#main-content .legal-related ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#main-content .legal-related li {
  margin: 0;
}

#main-content .legal-related a {
  display: inline-block;
  padding: 12px 20px;
  background: #f5f8ff;
  border: 1px solid #dce6fa;
  border-radius: 12px;
}

#main-content .legal-related a:hover {
  background: #eaf1ff;
}

/* ==========================================================
   DARK MODE — PURPLE + GOLD
========================================================== */

body.dark #main-content {
  background: #1a001f;
}

body.dark #main-content .legal-hero .container,
body.dark #main-content .legal-section,
body.dark #main-content .legal-related {
  background: linear-gradient(
    135deg,
    rgba(26, 0, 31, 0.96),
    rgba(10, 0, 18, 0.98)
  );

  border: 1px solid rgba(255, 255, 255, 0.10);
  border-left: 5px solid #a832d6;
  border-radius: 22px;

  box-shadow:
    0 0 40px rgba(168, 50, 214, 0.20),
    0 8px 30px rgba(0, 0, 0, 0.50);
}

body.dark #main-content .legal-hero h1,
body.dark #main-content .legal-section h2,
body.dark #main-content .legal-related h2 {
  color: #ffcc00;
  text-shadow: 0 0 12px rgba(255, 204, 0, 0.25);
}

body.dark #main-content .legal-hero p,
body.dark #main-content .legal-section p {
  color: #e4e4e4;
}

body.dark #main-content .legal-section address {
  background: rgba(168, 50, 214, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid #ffcc00;
  color: #eeeeee;
}

body.dark #main-content .legal-section address strong {
  color: #ffcc00;
}

body.dark #main-content .legal-section a,
body.dark #main-content .legal-related a {
  color: #ffcc00;
}

body.dark #main-content .legal-section a:hover,
body.dark #main-content .legal-related a:hover {
  color: #ffd84d;
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.30);
}

/* ==========================================================
   DARK MODE — FORMULAR
========================================================== */

body.dark #main-content .legal-form-template {
  background: rgba(10, 0, 20, 0.75);
  border: 1px solid rgba(168, 50, 214, 0.35);
  box-shadow: inset 0 0 25px rgba(168, 50, 214, 0.06);
}

body.dark #main-content .legal-form-template address {
  background: rgba(255, 255, 255, 0.035);
  border-left-color: #ffcc00;
}

body.dark #main-content .legal-form-template small {
  color: #c8bdd1;
}

body.dark #main-content .legal-related a {
  background: rgba(168, 50, 214, 0.12);
  border-color: rgba(168, 50, 214, 0.30);
}

body.dark #main-content .legal-related a:hover {
  background: rgba(168, 50, 214, 0.22);
}

/* ==========================================================
   DESKTOP HOVER — SUBTLE GLOW
========================================================== */

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body.dark #main-content .legal-section:hover,
  body.dark #main-content .legal-hero .container:hover {
    box-shadow:
      0 0 48px rgba(168, 50, 214, 0.28),
      0 8px 30px rgba(0, 0, 0, 0.55);
  }
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 768px) {
  #main-content {
    padding: 22px 15px 45px;
  }

  #main-content .legal-hero .container {
    padding: 28px 22px;
  }

  #main-content .legal-section,
  #main-content .legal-related {
    padding: 26px 22px;
  }

  #main-content .legal-form-template {
    padding: 22px;
  }

  #main-content .legal-section address {
    padding: 18px 20px;
  }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 480px) {
  #main-content {
    padding: 15px 12px 35px;
  }

  #main-content .legal-hero {
    padding: 10px 0 22px;
  }

  #main-content .legal-hero .container {
    padding: 26px 18px;
    border-radius: 15px;
  }

  #main-content .legal-hero h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  #main-content .legal-hero p {
    font-size: 1rem;
    line-height: 1.7;
  }

  #main-content .legal-section {
    padding: 23px 18px;
    margin-bottom: 18px;
    border-radius: 15px;
  }

  #main-content .legal-section h2 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 18px;
  }

  #main-content .legal-section p {
    font-size: 1rem;
    line-height: 1.75;
  }

  #main-content .legal-section address {
    padding: 16px;
    font-size: 0.95rem;
    line-height: 1.8;
  }

  #main-content .legal-form-template {
    padding: 18px 14px;
    border-radius: 12px;
  }

  #main-content .legal-related {
    padding: 25px 18px;
    border-radius: 15px;
  }

  #main-content .legal-related h2 {
    font-size: 1.35rem;
  }

  #main-content .legal-related ul {
    flex-direction: column;
  }

  #main-content .legal-related a {
    display: block;
    width: 100%;
  }
}

/* ==========================================================
   ACCESSIBILITY / PERFORMANCE
========================================================== */

@media (prefers-reduced-motion: reduce) {
  #main-content *,
  #main-content *::before,
  #main-content *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  #main-content {
    background: #ffffff !important;
    padding: 0;
  }

  #main-content .legal-hero .container,
  #main-content .legal-section,
  #main-content .legal-related,
  #main-content .legal-form-template {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
  }

  #main-content h1,
  #main-content h2,
  #main-content p,
  #main-content address,
  #main-content small {
    color: #000000 !important;
  }

  #main-content .legal-section {
    break-inside: avoid;
  }
}

/* DOWNLOAD BUTTON — WIDERRUF */

#main-content .wid-download {
  display: flex;
  justify-content: center;
  margin: 28px 0 5px;
}

#main-content .wid-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 100%;
  padding: 15px 28px;
  border-radius: 50px;
  background: linear-gradient(135deg, #0044cc, #0038b3);
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 68, 204, 0.25);
  transition: transform .2s ease, box-shadow .2s ease;
}

@media (hover: hover) {
  #main-content .wid-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 32px rgba(0, 68, 204, 0.35);
    color: #ffffff !important;
    text-decoration: none;
  }
}

body.dark #main-content .wid-download-btn {
  background: linear-gradient(135deg, #a832d6, #ffcc00);
  color: #17001e !important;
  box-shadow: 0 0 25px rgba(168, 50, 214, 0.25);
}

body.dark #main-content .wid-download-btn:hover {
  color: #17001e !important;
}

@media (max-width: 480px) {
  #main-content .wid-download-btn {
    width: 100%;
    padding: 14px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main-content .wid-download-btn {
    transition: none;
  }
}

/* ==========================================================
   DESIGNWEBY.CZ — WIDERRUF PDF DOWNLOAD
   LIGHT: SAPPHIRE BLUE
   DARK: PURPLE + GOLD
========================================================== */

#main-content .wid-download {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 30px auto 8px;
  text-align: center;
}

#main-content .wid-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: 100%;
  min-height: 52px;
  padding: 15px 30px;

  background: linear-gradient(
    135deg,
    #0044cc 0%,
    #0038b3 100%
  );

  color: #ffffff !important;
  border: 1px solid rgba(0, 68, 204, 0.2);
  border-radius: 50px;

  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none !important;
  overflow-wrap: anywhere;

  box-shadow: 0 12px 30px rgba(0, 68, 204, 0.25);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

/* LIGHT MODE HOVER */

@media (hover: hover) {
  #main-content .wid-download-btn:hover {
    transform: translateY(-3px);
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 18px 38px rgba(0, 68, 204, 0.35);
  }
}

/* KEYBOARD ACCESSIBILITY */

#main-content .wid-download-btn:focus-visible {
  outline: 3px solid #0066ff;
  outline-offset: 4px;
}

/* ==========================================================
   DARK MODE
========================================================== */

body.dark #main-content .wid-download-btn {
  background: linear-gradient(
    135deg,
    #a832d6 0%,
    #ffcc00 100%
  );

  color: #17001e !important;
  border: 1px solid rgba(255, 204, 0, 0.35);

  box-shadow:
    0 0 24px rgba(168, 50, 214, 0.25),
    0 8px 28px rgba(0, 0, 0, 0.35);
}

@media (hover: hover) {
  body.dark #main-content .wid-download-btn:hover {
    background: linear-gradient(
      135deg,
      #b643e0 0%,
      #ffd84a 100%
    );

    color: #17001e !important;

    box-shadow:
      0 0 35px rgba(255, 204, 0, 0.3),
      0 12px 30px rgba(0, 0, 0, 0.4);
  }
}

body.dark #main-content .wid-download-btn:focus-visible {
  outline-color: #ffcc00;
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {
  #main-content .wid-download {
    margin: 25px auto 5px;
  }

  #main-content .wid-download-btn {
    width: 100%;
    padding: 15px 18px;
    font-size: 0.96rem;
    border-radius: 18px;
  }
}

/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {
  #main-content .wid-download-btn {
    transition: none !important;
    transform: none !important;
  }
}

/* LANGUAGE DOWNLOAD SELECTOR */

#main-content .wid-download {
  display: block;
  text-align: center;
}

#main-content .wid-download-title {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a2a44;
}

#main-content .wid-download-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

#main-content .wid-download-options .wid-download-btn {
  flex: 1 1 180px;
  max-width: 250px;
  min-width: 0;
  padding: 14px 20px;
}

body.dark #main-content .wid-download-title {
  color: #ffcc00;
}

@media (max-width: 600px) {
  #main-content .wid-download-options {
    flex-direction: column;
    align-items: stretch;
  }

  #main-content .wid-download-options .wid-download-btn {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }
}

/* ==========================================================
   WIDERRUF — DOWNLOAD LAYOUT FIX
========================================================== */

#main-content .wid-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin: 35px auto 10px;
  text-align: center;
}

#main-content .wid-download-title {
  display: block;
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
}

#main-content .wid-download-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 14px;
}

#main-content .wid-download-options .wid-download-btn {
  flex: 0 1 230px;
  width: 230px;
  max-width: 100%;
  min-height: 52px;
  margin: 0;
}

@media (max-width: 600px) {
  #main-content .wid-download-options {
    flex-direction: column;
    align-items: stretch;
  }

  #main-content .wid-download-options .wid-download-btn {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }
}

.wid-online-action {
    text-align: center;
    margin: 30px 0;
}

.wid-online-action .wid-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================
   DESIGNWEBY.CZ — ONLINE WIDERRUF
   LIGHT: SAPPHIRE BLUE
   DARK: PURPLE + GOLD
========================================================== */

#main-content.withdrawal-online .container {
    max-width: 980px;
}

#main-content .withdrawal-card {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

#main-content .withdrawal-card > h2 {
    text-align: center;
}

#main-content .withdrawal-card > p {
    text-align: center;
}

/* FORM */

#main-content .withdrawal-form {
    width: 100%;
    max-width: 650px;
    margin: 28px auto 0;
}

#main-content .withdrawal-field {
    margin-bottom: 24px;
}

#main-content .withdrawal-field label {
    display: block;
    margin-bottom: 10px;
    color: #1a2a44;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

#main-content .withdrawal-field input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    background: #f8faff;
    color: #1a2a44;
    border: 1px solid #cbd8ec;
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

#main-content .withdrawal-field input:focus {
    outline: none;
    border-color: #0044cc;
    box-shadow: 0 0 0 3px rgba(0, 68, 204, .14);
}

/* BUTTONS */

#main-content .withdrawal-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 32px;
}

#main-content .withdrawal-submit {
    font-family: inherit;
    cursor: pointer;
    width: auto;
}

#main-content .withdrawal-secondary {
    display: inline-block;
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
    text-decoration: underline;
}

#main-content .withdrawal-back {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

/* SUMMARY */

#main-content .withdrawal-summary {
    display: grid;
    gap: 14px;
    margin: 24px 0;
    padding: 24px;
    background: #f5f8ff;
    border: 1px solid #dce6fa;
    border-radius: 16px;
}

#main-content .withdrawal-summary > div {
    min-width: 0;
}

#main-content .withdrawal-summary dt {
    margin-bottom: 5px;
    color: #52627a;
    font-size: .92rem;
    font-weight: 600;
}

#main-content .withdrawal-summary dd {
    margin: 0;
    color: #1a2a44;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

/* NOTICES */

#main-content .withdrawal-notice {
    padding: 20px 24px;
    margin-bottom: 22px;
    border-radius: 14px;
    border: 1px solid transparent;
}

#main-content .withdrawal-error {
    background: #fff0f0;
    color: #8a1d1d;
    border-color: #f2c7c7;
}

#main-content .withdrawal-success {
    background: #eaf7ee;
    border-color: #b8dfc4;
}

#main-content .withdrawal-success h2 {
    color: #155c31;
}

#main-content .withdrawal-success > p {
    color: #155c31;
}

/* INFORMATION */

#main-content .withdrawal-information {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* ==========================================================
   DARK MODE
========================================================== */

body.dark #main-content .withdrawal-field label {
    color: #f0e8f5;
}

body.dark #main-content .withdrawal-field input {
    background: rgba(10, 0, 20, .75);
    color: #ffffff;
    border-color: rgba(168, 50, 214, .4);
}

body.dark #main-content .withdrawal-field input:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, .16);
}

body.dark #main-content .withdrawal-summary {
    background: rgba(10, 0, 20, .75);
    border-color: rgba(168, 50, 214, .35);
}

body.dark #main-content .withdrawal-summary dt {
    color: #c8bdd1;
}

body.dark #main-content .withdrawal-summary dd {
    color: #ffffff;
}

body.dark #main-content .withdrawal-error {
    background: rgba(150, 30, 45, .16);
    border-color: rgba(255, 110, 120, .35);
    color: #ffd6d9;
}

body.dark #main-content .withdrawal-success {
    background: rgba(20, 110, 70, .16);
    border-color: rgba(100, 220, 150, .35);
}

body.dark #main-content .withdrawal-success h2,
body.dark #main-content .withdrawal-success > p {
    color: #b8ffd2;
}

body.dark #main-content .withdrawal-secondary {
    color: #ffcc00;
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {

    #main-content .withdrawal-form {
        margin-top: 22px;
    }

    #main-content .withdrawal-summary {
        padding: 18px;
    }

    #main-content .withdrawal-notice {
        padding: 18px;
    }

    #main-content .withdrawal-actions {
        align-items: stretch;
    }

    #main-content .withdrawal-submit {
        width: 100%;
    }

    #main-content .withdrawal-back .wid-download-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #main-content .withdrawal-field input {
        transition: none;
    }
}

/* ONLINE WIDERRUF BUTTON */

#main-content .wid-online-action {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

#main-content .wid-online-btn {
    min-width: 240px;
    text-align: center;
}

@media (max-width: 600px) {
    #main-content .wid-online-btn {
        width: 100%;
        min-width: 0;
    }
}

/* ======================================================
   WIDERRUF ONLINE – 3 LEGAL BUTTONS IN ONE ROW
====================================================== */

#main-content .withdrawal-legal-links ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

#main-content .withdrawal-legal-links li {
    display: flex;
    min-width: 0;
}

#main-content .withdrawal-legal-links li a {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px 12px;
    box-sizing: border-box;
    line-height: 1.1;
}

/* Tablet */
@media (max-width: 850px) {
    #main-content .withdrawal-legal-links ul {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   WIDERRUF ONLINE – BUTTON TEXT FIX
====================================================== */

@media (min-width: 851px) {

    #main-content .withdrawal-legal-links {
        padding-left: 20px;
        padding-right: 20px;
    }

    #main-content .withdrawal-legal-links ul {
        grid-template-columns: 1.4fr 1.2fr 1.2fr;
        gap: 10px;
    }

    #main-content .withdrawal-legal-links li a {
        font-size: 0.88rem;
        padding: 14px 8px;

        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;

        white-space: normal;
        text-decoration: none;
    }

}