/* com_schachturniere 0.3.99 – eine Ausschreibung, drei Darstellungen.
   Nur die Ausschreibung und ihre eigenstaendige Druckansicht werden gestaltet.
   Teilnehmerlisten, Finanzdrucke, Livebrett und Anmeldeformulare bleiben unberuehrt. */

.com-schachturniere .st-section-announcement {
  min-width: 0;
  padding: clamp(1rem, 2.2vw, 1.8rem);
}

.com-schachturniere .st-announcement-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  margin-bottom: clamp(1rem, 1.7vw, 1.4rem);
  padding-bottom: .9rem;
  border-bottom: 1px solid #e4dacb;
}

.com-schachturniere .st-announcement-kicker {
  margin: 0 0 .15rem;
  font-size: .76rem;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #845b22;
}

.com-schachturniere .st-announcement-screen-head h2 {
  margin: 0;
  color: #172b43;
  font-size: clamp(1.32rem, 1.5vw, 1.65rem);
  line-height: 1.2;
  font-weight: 750;
}

.com-schachturniere .st-announcement-print-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: .35rem;
  padding: .55rem .85rem;
  min-height: 2.5rem;
  border: 1px solid #d7c6a9;
  border-radius: 9px;
  background: #fbf6eb;
  color: #253952;
  text-decoration: none;
  font-size: .94rem;
  line-height: 1.2;
  font-weight: 700;
  box-sizing: border-box;
}

.com-schachturniere .st-announcement-print-link:hover,
.com-schachturniere .st-announcement-print-link:focus-visible {
  background: #f5e9d0;
  color: #15283d;
  border-color: #bd985b;
}

/* Mittig stehende, breitere Lesespalte statt der alten 75ch-Sperre.
   Tabellen nutzen die gesamte Spalte, Fliesstext bleibt gut lesbar. */
.com-schachturniere .st-section-announcement .st-announcement-body {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-width: 0;
  box-sizing: border-box;
  color: #233044;
  font-size: clamp(1rem, .35vw + .93rem, 1.1rem);
  line-height: 1.64;
  overflow-wrap: break-word;
  hyphens: auto;
}

.com-schachturniere .st-announcement-body > :first-child {
  margin-top: 0;
}

.com-schachturniere .st-announcement-body > :last-child {
  margin-bottom: 0;
}

.com-schachturniere .st-announcement-body p,
.com-schachturniere .st-announcement-body ul,
.com-schachturniere .st-announcement-body ol,
.com-schachturniere .st-announcement-body blockquote {
  margin: 0 0 1rem;
}

.com-schachturniere .st-announcement-body h2,
.com-schachturniere .st-announcement-body h3,
.com-schachturniere .st-announcement-body h4 {
  color: #172b43;
  line-height: 1.28;
  font-weight: 750;
  letter-spacing: -.012em;
  overflow-wrap: anywhere;
}

.com-schachturniere .st-announcement-body h2 {
  margin: 1.5rem 0 .65rem;
  font-size: clamp(1.38rem, 1.5vw, 1.7rem);
}

.com-schachturniere .st-announcement-body h3 {
  margin: 1.35rem 0 .55rem;
  font-size: clamp(1.17rem, 1.15vw, 1.36rem);
}

.com-schachturniere .st-announcement-body h4 {
  margin: 1.1rem 0 .4rem;
  font-size: 1.07rem;
}

.com-schachturniere .st-announcement-body li {
  margin-bottom: .32rem;
  padding-left: .13rem;
}

.com-schachturniere .st-announcement-body ul,
.com-schachturniere .st-announcement-body ol {
  padding-left: 1.5rem;
}

.com-schachturniere .st-announcement-body a {
  text-underline-offset: .16em;
}

.com-schachturniere .st-announcement-body blockquote {
  padding: .55rem .9rem;
  border-left: 3px solid #bb9051;
  background: #fbf8f1;
}

.com-schachturniere .st-announcement-body table {
  width: 100%;
  max-width: 100%;
  margin: 1.2rem 0;
  border-collapse: collapse;
  font-size: .97em;
  line-height: 1.42;
}

.com-schachturniere .st-announcement-body th,
.com-schachturniere .st-announcement-body td {
  padding: .65rem .8rem;
  border: 1px solid #e0d6c7;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.com-schachturniere .st-announcement-body th {
  color: #213950;
  background: #f5efe3;
  font-weight: 750;
}

.com-schachturniere .st-announcement-body tr:nth-child(even) td {
  background: #fcfaf6;
}


/* PC und Tablet quer: dieselbe natürliche Spaltenaufteilung wie beim A4-Druck.
   Nur echte zweispaltige Ausschreibungstabellen. Die erste Spalte ist genau
   so breit wie ihre Bezeichnungen (z.B. „Preisklassen“, „Samstag, 25.09.“).
   Beschreibung/Programm nutzt den verbleibenden Raum und bricht lesbar um.
   Ab 760 px gelten weiterhin die bereits bewährten Handy-Regeln. */
@media (min-width: 761px) {
  .com-schachturniere .st-announcement-body table:not(:has(tr > :nth-child(3))) {
    table-layout: auto;
  }

  .com-schachturniere .st-announcement-body table:not(:has(tr > :nth-child(3))) tr > :first-child:not(:only-child) {
    width: 1%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .com-schachturniere .st-announcement-body table:not(:has(tr > :nth-child(3))) tr > :nth-child(2) {
    width: auto;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }
}

@media (max-width: 760px) {
  .com-schachturniere .st-section-announcement {
    padding: 1rem .85rem;
  }

  .com-schachturniere .st-announcement-screen-head {
    gap: .75rem;
  }

  .com-schachturniere .st-section-announcement .st-announcement-body {
    font-size: 1rem;
    line-height: 1.58;
    hyphens: auto;
  }

  /* Zwei Spalten passen lesbar ins Handy: Bezeichnung links, Wert rechts.
     Breite Tabellen (ab drei Spalten) scrollen nur IN der Tabelle, ohne
     Worte in winzige Fragmente zu zerbrechen oder die Seite zu verbreitern. */
  .com-schachturniere .st-announcement-body table {
    width: 100%;
    max-width: 100%;
  }

  .com-schachturniere .st-announcement-body table:not(:has(tr > :nth-child(3))) th:first-child {
    width: 34%;
    min-width: 6rem;
  }

  .com-schachturniere .st-announcement-body table:has(tr > :nth-child(3)) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .com-schachturniere .st-announcement-body table:has(tr > :nth-child(3)) th,
  .com-schachturniere .st-announcement-body table:has(tr > :nth-child(3)) td {
    min-width: 7rem;
    overflow-wrap: normal;
    hyphens: none;
  }

  .com-schachturniere .st-announcement-body th,
  .com-schachturniere .st-announcement-body td {
    padding: .48rem .55rem;
  }
}

@media (max-width: 390px) {
  .com-schachturniere .st-announcement-print-link {
    width: 100%;
  }
}

/* Unabhaengige Druckansicht, bewusst ohne Joomla-Template und dessen
   A4-Querformat fuer Kassen- und Check-in-Listen. */
.st-announcement-print-page {
  background: #eeece8;
  color: #18293b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.56;
  margin: 0;
}

.st-announcement-print-page *,
.st-announcement-print-page *::before,
.st-announcement-print-page *::after {
  box-sizing: border-box;
}

.st-announcement-print-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  max-width: 940px;
  margin: 1.1rem auto;
  padding: 0 .85rem;
}

.st-announcement-print-toolbar a {
  color: #203f67;
  text-decoration: underline;
}

.st-announcement-print-toolbar button {
  cursor: pointer;
  border: 1px solid #ae8953;
  background: #fff5df;
  color: #1c344e;
  font: 700 15px Arial, Helvetica, sans-serif;
  padding: .7rem .95rem;
  border-radius: 8px;
}

.st-announcement-print-sheet {
  max-width: 940px;
  margin: 0 auto 2rem;
  padding: clamp(1.2rem, 5vw, 3rem);
  background: #fff;
  box-shadow: 0 6px 32px rgba(20, 30, 45, .13);
}

.st-announcement-print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  border-bottom: 2px solid #b28a51;
  padding-bottom: 1.2rem;
  margin-bottom: 1.3rem;
}

.st-announcement-print-brand {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1.2rem;
}

.st-announcement-print-logo {
  max-width: 80px;
  width: auto;
  max-height: 86px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Auf der rechten Seite ausschließlich in der Druckansicht, nicht im Frontend-Text. */
.st-announcement-print-icon {
  display: block;
  width: 30mm;
  height: 30mm;
  max-width: 30mm;
  max-height: 30mm;
  object-fit: contain;
  flex: 0 0 30mm;
  margin-left: auto;
}

.st-announcement-print-club {
  text-transform: uppercase;
  font-size: .84rem;
  letter-spacing: .08em;
  font-weight: 800;
  color: #8a6532;
  margin: 0 0 .35rem;
}

.st-announcement-print-header h1 {
  margin: 0;
  color: #172a42;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  line-height: 1.16;
}

.st-announcement-print-type {
  margin: .5rem 0 0;
  color: #596474;
  font-size: .95rem;
}

.st-announcement-print-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem 1.5rem;
  padding: .9rem 1rem;
  background: #f7f3eb;
  border-radius: 8px;
  margin: 0 0 1.6rem;
}

.st-announcement-print-facts div {
  min-width: 0;
}

.st-announcement-print-facts dt {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: #705129;
}

.st-announcement-print-facts dd {
  margin: .1rem 0 0;
  font-size: .98rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.st-announcement-print-copy .st-announcement-body {
  width: 100%;
  max-width: none;
  font-size: 1rem;
  line-height: 1.62;
  overflow-wrap: break-word;
  hyphens: auto;
}

.st-announcement-print-copy .st-announcement-body > :first-child {
  margin-top: 0;
}

.st-announcement-print-copy .st-announcement-body h2,
.st-announcement-print-copy .st-announcement-body h3,
.st-announcement-print-copy .st-announcement-body h4 {
  color: #172a42;
  line-height: 1.27;
  break-after: avoid;
  page-break-after: avoid;
}

.st-announcement-print-copy .st-announcement-body h2 {
  font-size: 1.44rem;
  margin: 1.4rem 0 .55rem;
}

.st-announcement-print-copy .st-announcement-body h3 {
  font-size: 1.2rem;
  margin: 1.15rem 0 .5rem;
}

.st-announcement-print-copy .st-announcement-body h4 {
  font-size: 1.04rem;
  margin: 1.05rem 0 .4rem;
}

.st-announcement-print-copy .st-announcement-body p,
.st-announcement-print-copy .st-announcement-body ul,
.st-announcement-print-copy .st-announcement-body ol {
  margin: 0 0 .9rem;
}

.st-announcement-print-copy .st-announcement-body ul,
.st-announcement-print-copy .st-announcement-body ol {
  padding-left: 1.5rem;
}

.st-announcement-print-copy .st-announcement-body table {
  width: 100%;
  border-collapse: collapse;
  margin: .8rem 0 1.1rem;
  font-size: .92em;
  line-height: 1.4;
}

.st-announcement-print-copy .st-announcement-body td,
.st-announcement-print-copy .st-announcement-body th {
  border: 1px solid #d5d1c9;
  padding: .42rem .55rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.st-announcement-print-copy .st-announcement-body th {
  background: #f3efe8;
  color: #1d324b;
}

/* Zweispaltige Tabellen: die Beschriftungen bestimmen die linke Breite.
   Keine kuenstlichen Worttrennungen (Auswer-tung / Preisklas-sen).
   Die Beschreibung nutzt den restlichen Platz und bricht an Wortgrenzen um.
   Tabellen mit drei oder mehr Spalten behalten ihr bisheriges Layout. */
.st-announcement-print-copy .st-announcement-body table:not(:has(tr > :nth-child(3))) {
  table-layout: auto;
}
.st-announcement-print-copy .st-announcement-body table:not(:has(tr > :nth-child(3))) tr > :first-child:not(:only-child) {
  width: 1%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.st-announcement-print-copy .st-announcement-body table:not(:has(tr > :nth-child(3))) tr > :nth-child(2) {
  width: auto;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.st-announcement-print-footer {
  margin-top: 2rem;
  padding-top: .65rem;
  border-top: 1px solid #cbb994;
  color: #566170;
  font-size: .77rem;
}

@media (max-width: 620px) {
  .st-announcement-print-sheet {
    margin: 0 0 1rem;
    padding: 1rem;
  }
  .st-announcement-print-facts {
    grid-template-columns: 1fr;
    gap: .55rem;
  }
  .st-announcement-print-brand {
    gap: .75rem;
  }
  .st-announcement-print-icon {
    width: 60px;
    height: 60px;
    max-width: 60px;
    max-height: 60px;
    flex-basis: 60px;
  }
  .st-announcement-print-logo {
    max-width: 60px;
  }
  .st-announcement-print-copy .st-announcement-body table {
    width: 100%;
    max-width: 100%;
  }
  /* Die erste Spalte folgt dem laengsten Begriff statt einer festen Prozentbreite. */
  .st-announcement-print-copy .st-announcement-body table:not(:has(tr > :nth-child(3))) tr > :first-child:not(:only-child) {
    width: 1%;
    min-width: 0;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  .st-announcement-print-copy .st-announcement-body table:not(:has(tr > :nth-child(3))) tr > :nth-child(2) {
    overflow-wrap: anywhere;
  }

  .st-announcement-print-copy .st-announcement-body table:has(tr > :nth-child(3)) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .st-announcement-print-copy .st-announcement-body table:has(tr > :nth-child(3)) th,
  .st-announcement-print-copy .st-announcement-body table:has(tr > :nth-child(3)) td {
    min-width: 7rem;
    overflow-wrap: normal;
    hyphens: none;
  }
}

@page {
  size: A4 portrait;
  margin: 15mm 16mm 17mm;
}

@media print {
  html, body.st-announcement-print-page {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .st-announcement-print-page {
    color: #111f30;
    font-size: 10.5pt;
    line-height: 1.48;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .st-announcement-print-toolbar {
    display: none !important;
  }
  .st-announcement-print-sheet {
    width: auto;
    max-width: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    background: transparent;
  }
  .st-announcement-print-header {
    margin-bottom: 7mm;
    padding-bottom: 5mm;
  }
  .st-announcement-print-club {
    font-size: 8.5pt;
  }
  .st-announcement-print-header h1 {
    font-size: 21pt;
  }
  .st-announcement-print-type {
    font-size: 9.5pt;
  }
  .st-announcement-print-logo {
    max-width: 24mm;
    max-height: 25mm;
  }
  .st-announcement-print-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2mm 6mm;
    padding: 3mm 4mm;
    margin-bottom: 7mm;
    break-inside: avoid;
  }
  .st-announcement-print-facts dt {
    font-size: 8pt;
  }
  .st-announcement-print-facts dd {
    font-size: 9.5pt;
  }
  .st-announcement-print-copy .st-announcement-body {
    font-size: 10.5pt;
    line-height: 1.49;
  }
  .st-announcement-print-copy .st-announcement-body h2 {
    font-size: 15pt;
    margin: 5mm 0 2mm;
  }
  .st-announcement-print-copy .st-announcement-body h3 {
    font-size: 12.5pt;
    margin: 4mm 0 1.5mm;
  }
  .st-announcement-print-copy .st-announcement-body h4 {
    font-size: 11pt;
    margin: 3mm 0 1.5mm;
  }
  .st-announcement-print-copy .st-announcement-body p,
  .st-announcement-print-copy .st-announcement-body li {
    orphans: 3;
    widows: 3;
  }
  .st-announcement-print-copy .st-announcement-body p,
  .st-announcement-print-copy .st-announcement-body ul,
  .st-announcement-print-copy .st-announcement-body ol {
    margin-bottom: 2.5mm;
  }
  .st-announcement-print-copy .st-announcement-body table {
    display: table;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    font-size: 9pt;
    break-inside: auto;
  }
  .st-announcement-print-copy .st-announcement-body thead {
    display: table-header-group;
  }
  .st-announcement-print-copy .st-announcement-body tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .st-announcement-print-copy .st-announcement-body th,
  .st-announcement-print-copy .st-announcement-body td {
    padding: 2mm 2.5mm;
  }
  .st-announcement-print-footer {
    margin-top: 7mm;
    break-inside: avoid;
    font-size: 8pt;
  }
  .st-announcement-print-page a {
    color: #1a3653;
    text-decoration: underline;
  }
}
