/* Modernes Styling für [spieletabelle] */

.wpg-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.wpg-search-form {
    justify-self: start;
}

.wpg-recent-btn {
    justify-self: center;
}

.wpg-sort {
    justify-self: end;
}

.wpg-tabs {
    list-style: none;
    display: flex;
    gap: 4px;
    padding: 0;
    margin: 0;
    overflow-x: auto;
}

.wpg-tabs li {
    display: inline-block;
}

.wpg-tabs a {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: #5f5e5a;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.wpg-tabs a:hover {
    background: #f1efe8;
}

.wpg-tabs a.active {
    background: #e6f1fb;
    color: #185fa5;
    font-weight: 600;
}

.wpg-search-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpg-search {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d3d1c7;
    font-size: 13px;
    background: #fff;
    min-width: 180px;
}

.wpg-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #d3d1c7;
    color: #5f5e5a;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.wpg-search-btn:hover {
    background: #f1efe8;
}

.wpg-search-clear {
    font-size: 12px;
    color: #a3a29a;
    text-decoration: none;
    white-space: nowrap;
}

.wpg-search-clear:hover {
    color: #5f5e5a;
}

.wpg-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wpg-sort label {
    font-size: 13px;
    color: #5f5e5a;
    margin: 0;
}

.wpg-sort select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d3d1c7;
    font-size: 13px;
    background: #fff;
}

.wpg-recent-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #d3d1c7;
    font-size: 13px;
    color: #2c2c2a;
    text-decoration: none;
    background: #fff;
    transition: background 0.15s ease;
}

.wpg-recent-btn:hover {
    background: #f1efe8;
}

.wpg-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e3db;
    border-radius: 12px;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

table.wpg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.wpg-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: #5f5e5a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: #f7f6f2;
    border-bottom: 1px solid #e5e3db;
    white-space: nowrap;
}

table.wpg-table thead th.wpg-center {
    text-align: center;
}

table.wpg-table tbody tr {
    border-top: 1px solid #efeee8;
}

table.wpg-table tbody tr:nth-child(even) {
    background: #fafaf7;
}

table.wpg-table tbody tr:hover {
    background: #f1f5fb;
}

table.wpg-table td {
    padding: 12px 14px;
    vertical-align: top;
}

table.wpg-table td.wpg-center {
    text-align: center;
}

table.wpg-table td.wpg-muted,
table.wpg-table .wpg-muted {
    color: #a3a29a;
}

table.wpg-table .wpg-secondary {
    color: #5f5e5a;
}

table.wpg-table a {
    color: #185fa5;
    text-decoration: none;
}

table.wpg-table a:hover {
    text-decoration: underline;
}

.wpg-flag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    background: #e6f1fb;
    color: #185fa5;
    vertical-align: middle;
}

.wpg-review-line {
    display: block;
    margin-bottom: 4px;
}

.wpg-review-line:last-child {
    margin-bottom: 0;
}

.wpg-gotm {
    vertical-align: middle;
    margin-right: 4px;
}

.wpg-avg {
    font-weight: 600;
}

@media (max-width: 640px) {
    .wpg-toolbar {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .wpg-search-form,
    .wpg-recent-btn,
    .wpg-sort {
        justify-self: center;
    }
}

/* [spieldetails] */
.wpg-detail {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    max-width: 900px;
}

.wpg-detail h2 {
    margin-bottom: 12px;
}

.wpg-detail-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.wpg-cover,
.wpg-cover-shadow img {
    max-width: 250px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    flex: 0 0 auto;
}

.wpg-cover-shadow {
    flex: 0 0 auto;
}

.wpg-cover-shadow img {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

table.wpg-detail-table {
    flex: 1 1 320px;
    min-width: 280px;
    border-collapse: collapse;
    font-size: 14px;
}

table.wpg-detail-table th {
    text-align: right;
    vertical-align: top;
    padding: 8px 14px 8px 0;
    color: #5f5e5a;
    font-weight: 600;
    width: 30%;
    white-space: nowrap;
}

table.wpg-detail-table td {
    text-align: left;
    vertical-align: top;
    padding: 8px 0;
}

table.wpg-detail-table tr {
    border-top: 1px solid #efeee8;
}

table.wpg-detail-table a {
    color: #185fa5;
    text-decoration: none;
}

table.wpg-detail-table a:hover {
    text-decoration: underline;
}

.wpg-avg-rating {
    font-size: 22px;
    font-weight: 700;
    color: #185fa5;
}

/* [rangliste] – eigene Toolbar-Variante, nur ein Formular statt drei Grid-Spalten */
.wpg-rangliste-toolbar {
    display: block;
}

.wpg-rangliste-toolbar .wpg-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* [spielvorschlaege] */
.wpg-vorschlaege-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.wpg-filter-gruppe {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wpg-filter-label {
    font-size: 12px;
    color: #5f5e5a;
    font-weight: 600;
}

.wpg-filter-gruppe input[type="number"] {
    width: 90px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d3d1c7;
    font-size: 13px;
    background: #fff;
}

.wpg-filter-bis {
    font-size: 12px;
    color: #a3a29a;
    margin: 0 4px;
    align-self: center;
}

.wpg-vorschlaege-form .wpg-recent-btn {
    border: none;
    background: #185fa5;
    color: #fff;
    cursor: pointer;
    height: 34px;
}

.wpg-vorschlaege-form .wpg-recent-btn:hover {
    background: #144d87;
}

/* [neueste_berichte_startseite] */
.wpg-berichte-liste {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.wpg-bericht-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #efeee8;
}

.wpg-bericht-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wpg-bericht-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    flex: 0 0 auto;
}

.wpg-bericht-thumb-link {
    flex: 0 0 auto;
}

.wpg-bericht-thumb {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.wpg-bericht-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wpg-bericht-info .wpg-muted {
    font-size: 12px;
}

.wpg-bericht-titel {
    color: #185fa5;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.wpg-bericht-titel:hover {
    text-decoration: underline;
}

.wpg-bericht-excerpt {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #5f5e5a;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wpg-bericht-excerpt.wpg-clamp-2 {
    -webkit-line-clamp: 2;
}

.wpg-bericht-excerpt.wpg-clamp-3 {
    -webkit-line-clamp: 3;
}

.wpg-bericht-excerpt.wpg-clamp-4 {
    -webkit-line-clamp: 4;
}

/* Hilfsklassen, um zwei Shortcode-Tabellen nebeneinander anzuordnen
   (z.B. via Custom-HTML-Block: <div class="wpg-two-col"><div class="wpg-col">[shortcode1]</div><div class="wpg-col">[shortcode2]</div></div>) */
.wpg-two-col {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-start;
    border-top: 2px solid #efeee8;
}

.wpg-two-col .wpg-col {
    flex: 1 1 300px;
    min-width: 260px;
}
