﻿/* =========================================================
   Grundfärger. --club-primary sätts från föreningens
   inställningar (SiteSettings.PrimaryColor) i SiteShell.
   ========================================================= */
:root {
    --club-primary: #b5121b;
    --text: #333;
    --muted: #888;
    --line: #e2e2e2;
    --panel: #f7f7f7;
    --page-bg: #e9e9e9;
}

html, body {
    font-family: Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--page-bg);
}

h1, h2, h3, h4, .h5 {
    font-family: Inter, Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #333;
}

h1 {
    font-size: 28px;
    margin-bottom: 14px;
}

h1:focus {
    outline: none;
}

a {
    color: var(--club-primary);
}

/* =========================================================
   Ramen (SiteShell)
   ========================================================= */
.site {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 1360px;
    margin: 0 auto;
    padding: 24px 10px;
}

.site-main {
    flex: 1;
    min-width: 0;
    background: #fff;
    padding: 10px;
    box-shadow: 0 0 6px rgba(0, 0, 0, .06);
}

.site-body {
    display: flex;
    align-items: stretch;
    margin-top: 6px;
    min-height: 600px;
}

.site-content {
    flex: 1;
    min-width: 0;
    padding: 25px 25px 40px 35px;
}

.site-right {
    flex: 0 0 250px;
}

.site-footer {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 10px 30px;
    color: var(--muted);
    font-size: 13px;
}

/* Innehåll + högerspalt (widgets) inne i sidan */
.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 215px;
    gap: 35px;
}

.page-aside {
    padding-top: 10px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.page-header h1 {
    margin: 0;
}

.page-header-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-image {
    display: block;
    width: 100%;
    border-radius: 4px;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 20px;
}

.section-divider {
    margin: 22px 0;
    border-color: #ccc;
}

.rich-text {
    line-height: 1.6;
}

.rich-text p {
    margin-bottom: 1.4em;
}

.pre-line {
    white-space: pre-line;
}

.nowrap {
    white-space: nowrap;
}

/* =========================================================
   Widgets i högerspalten
   ========================================================= */
.widget {
    background: var(--panel);
    border: 1px solid #ededed;
    border-radius: 3px;
    padding: 12px;
    margin-bottom: 22px;
    font-size: 14px;
}

.widget--titled {
    padding-top: 0;
}

.widget-title {
    margin: 0 -6px 10px;
    padding: 8px 14px;
    background: #222;
    color: #fff;
    font-size: 15px;
    border-radius: 3px 3px 0 0;
    letter-spacing: -.2px;
}

.widget-heading {
    font-size: 17px;
    margin-bottom: 8px;
}

.widget-empty {
    color: var(--muted);
    margin: 0 0 4px;
}

.widget-link {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.match-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.match-meta strong {
    color: #444;
}

.match-team {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}

.match-team-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-score {
    font-weight: 700;
}

.team-badge {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.team-badge--large {
    width: 90px;
    height: 100px;
}

.match-link {
    color: #333;
    text-decoration: none;
}

.team-badge--empty {
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fafafa;
}

.follow-link,
.share-link {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
    text-decoration: none;
}

.follow-link {
    color: #8a3ab9;
}

.share-link {
    color: #3b5998;
}

.share-link--x {
    color: #111;
}

.share-link--rss {
    color: #e8611c;
}

.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.share-icon--fb { background: #3b5998; }
.share-icon--x { background: #111; }
.share-icon--rss { background: #e8611c; font-size: 10px; letter-spacing: -2px; }

.news-sidebar {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-sidebar li {
    margin-bottom: 10px;
}

.news-sidebar a {
    text-decoration: none;
}

.news-sidebar-meta {
    color: var(--muted);
    font-size: 12px;
}

.standings {
    width: 100%;
    font-size: 12px;
}

.standings th {
    padding: 4px 3px;
    border-bottom: 2px solid var(--line);
}

.standings td {
    padding: 6px 3px;
    border-bottom: 1px solid var(--line);
}

.standings-team {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 130px;
}

.standings-team span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.standings tr.own td {
    font-weight: 700;
}

.num {
    text-align: right;
}

/* =========================================================
   Nyheter
   ========================================================= */
.news-item {
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #ddd;
}

.news-tag {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.news-title {
    font-size: 28px;
    line-height: 1.25;
    margin: 0 0 6px;
}

.news-title a {
    color: #333;
    text-decoration: none;
}

.news-meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.news-comment-count {
    margin-left: 12px;
    color: var(--muted);
    text-decoration: none;
}

.news-figure img {
    display: block;
    width: 100%;
    border-radius: 4px;
}

.news-figure figcaption {
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
    margin-top: 6px;
}

.read-more {
    color: var(--club-primary);
}

.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
}

/* =========================================================
   Lag, trupp och statistik
   ========================================================= */
/* Våra lag: ett kort per kategori */
.team-card {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.team-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.team-card-head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.team-card-count {
    padding: 1px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #e9e9e9;
    color: #555;
    font-size: 10px;
}

.team-card-row {
    padding: 10px 12px;
}

.team-card-row + .team-card-row {
    border-top: 1px solid #ddd;
}

.team-card-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.team-card-name:hover {
    color: var(--club-primary);
}

.team-card-name svg {
    color: #888;
}

.team-card-contacts {
    margin-top: 4px;
    color: #888;
    font-size: 13px;
    line-height: 1.5;
}

.squad-section {
    margin-bottom: 30px;
}

.squad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 18px;
}

.squad-card {
    text-align: center;
}

.squad-name {
    margin-top: 6px;
    font-weight: 500;
}

.squad-number {
    color: var(--muted);
    margin-right: 4px;
}

.squad-role {
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
}

.avatar {
    flex: none; /* trycks aldrig ihop i en flex-rad (t.ex. användarmenyn) */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
    color: #666;
    font-weight: 700;
    vertical-align: middle;
}

.toggle-group {
    display: inline-flex;
    border: 1px solid #ccc;
    border-radius: 3px;
    overflow: hidden;
}

.toggle-group a {
    padding: 6px 12px;
    color: #444;
    text-decoration: none;
}

.toggle-group a + a {
    border-left: 1px solid #ccc;
}

.toggle-group a.active {
    background: #e9e9e9;
}

.stats-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.data-table thead th {
    padding: 10px 8px;
    background: #f2f2f2;
    border-bottom: 2px solid #ddd;
    font-size: 13px;
    font-weight: 700;
}

.data-table td {
    padding: 8px;
    border-bottom: 1px solid #e6e6e6;
}

.data-table tr.own td {
    font-weight: 700;
}

.data-table tr.upcoming td {
    color: #555;
}

.stats-avatar {
    width: 40px;
}

.stats-number {
    display: inline-block;
    min-width: 22px;
    color: var(--muted);
    text-align: right;
    margin-right: 6px;
}

.stats-name {
    color: var(--club-primary);
}

.stat-icon {
    display: inline-block;
    vertical-align: middle;
}

.stat-icon--goal {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #222;
    background: radial-gradient(circle, #222 0 3px, #fff 3.5px);
}

.stat-icon--yellow,
.stat-icon--red {
    width: 10px;
    height: 14px;
    border-radius: 1px;
}

.stat-icon--yellow { background: #ffd800; }
.stat-icon--red { background: #e60000; }
.stat-icon--star { color: #1e7be0; font-size: 16px; }

/* =========================================================
   Kalender
   ========================================================= */
.calendar-links {
    margin: -6px 0 12px;
}

.calendar-links a {
    text-decoration: none;
}

.calendar-nav {
    display: flex;
    align-items: stretch;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

.calendar-nav a {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    color: #333;
    font-size: 26px;
    line-height: 1;
    text-decoration: none;
}

.calendar-nav a:first-child { border-right: 1px solid #ccc; }
.calendar-nav a:last-child { border-left: 1px solid #ccc; }

.calendar-nav span {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Inter, Roboto, sans-serif;
    font-weight: 700;
    font-size: 18px;
}

.calendar-day {
    display: flex;
    gap: 14px;
    padding: 8px 10px;
    border-top: 1px solid var(--line);
    min-height: 46px;
}

.calendar-day.weekend { background: #f3f3f3; }
.calendar-day.match { background: #fbf1f1; }
.calendar-day.today { background: #fdf5d2; }

.calendar-date {
    flex: 0 0 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
}

.calendar-date strong {
    color: #333;
    font-size: 15px;
}

.calendar-date.sunday,
.calendar-date.sunday strong {
    color: var(--club-primary);
}

.calendar-items {
    flex: 1;
}

.calendar-item {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}

.calendar-time {
    display: flex;
    flex-direction: column;
    font-size: 15px;
}

.calendar-time strong {
    font-weight: 400;
}

.calendar-time span {
    color: var(--muted);
}

.calendar-detail {
    color: var(--muted);
    font-size: 13px;
}

.calendar-week {
    padding: 6px;
    text-align: center;
    background: #f6f6f6;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

/* =========================================================
   Bildgalleri
   ========================================================= */
.album-count {
    margin: -8px 0 10px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.album-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
}

.album-card img,
.album-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 3;
    object-fit: cover;
    background: #e5e5e5;
}

.album-title {
    padding: 10px 10px 2px;
    color: var(--club-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-meta {
    padding: 0 10px 10px;
    color: var(--muted);
    font-size: 13px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 6px;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

/* =========================================================
   Kontakt, textsidor, utmärkelser
   ========================================================= */
.info-rows {
    display: grid;
    grid-template-columns: 165px 1fr;
    margin: 30px 0 40px;
}

.info-rows dt,
.info-rows dd {
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px solid var(--line);
}

.info-rows dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    padding-top: 11px;
}

.contact-group {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.contact-group h2 {
    font-size: 21px;
}

.contact-table th {
    font-weight: 700;
    padding: 2px 30px 2px 0;
    white-space: nowrap;
    vertical-align: top;
}

.contact-table td {
    padding: 2px 30px 2px 0;
    vertical-align: top;
}

.facilities h2 {
    font-size: 21px;
}

.facility {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.facility p {
    margin: 0;
}

.print-row {
    text-align: right;
}

.print-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: none;
    color: #333;
    font-size: 15px;
}

.print-button:hover {
    color: var(--club-primary);
}

.award-list {
    list-style: none;
    padding: 0;
    line-height: 1.6;
}

.award-list span {
    display: inline-block;
    min-width: 38px;
}

/* Tabeller utan kortram (mobilens "Visa tabeller") */
.standings-plain {
    margin-top: 24px;
}

.standings-heading {
    font-size: 22px;
    margin-bottom: 10px;
}

.standings-plain .standings {
    font-size: 15px;
}

.standings-plain .standings td {
    padding: 9px 4px;
}

.standings-plain .standings-team {
    max-width: none;
}

/* =========================================================
   Responsivt – justeras när mobilvyerna kommer
   ========================================================= */
@media screen and (max-width: 1100px) {
    .site {
        flex-direction: column;
        align-items: stretch;
    }

    .site-right {
        flex: none;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 10px;
    }
}

@media screen and (max-width: 900px) {
    .page-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    html, body {
        font-size: 16px;
    }

    .desktop-only {
        display: none !important;
    }

    .site {
        padding: 0;
        gap: 0;
    }

    .site-right {
        padding: 20px 14px;
    }

    .match-meta {
        white-space: normal;
        font-size: 15px;
    }

    .match-team {
        font-size: 17px;
    }

    .team-badge {
        width: 24px;
        height: 24px;
    }

    h1 {
        font-size: 30px;
        line-height: 1.15;
    }

    .site-main {
        padding: 0;
    }

    .site-body {
        flex-direction: column;
        min-height: 0;
    }

    .site-content {
        padding: 18px 14px 30px;
    }

    .news-title {
        font-size: 22px;
    }

    .info-rows {
        grid-template-columns: 1fr;
    }

    .contact-table th,
    .contact-table td {
        display: block;
        padding: 0;
    }

    .contact-table tr {
        display: block;
        padding: 6px 0;
        border-bottom: 1px solid var(--line);
    }
}

/* =========================================================
   Utskrift – bara innehållet, kompakt (som originalet):
   ingen header, menyer, Instagram, sponsorer eller knappar.
   Mobillayouten gäller bara skärm (@media screen), så utskriften får datorlayouten.
   ========================================================= */
@page {
    margin: 15mm 14mm;
}

@media print {
    html, body { background: #fff !important; }
    body { font-size: 9pt; line-height: 1.35; color: #000; }

    .top-nav, .club-header, .mobile-bar, .mobile-top-menu, .side-nav, .site-right, .site-footer,
    .page-aside, .print-row, .calendar-nav, .calendar-links, .login-modal, #blazor-error-ui {
        display: none !important;
    }

    .site, .site-main, .site-body, .site-content {
        display: block !important;
        max-width: none !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    h1 { font-size: 15pt; margin: 0 0 10pt; }
    h2 { font-size: 10.5pt; margin: 12pt 0 4pt; }
    a { color: #000; }

    /* Kontakt: en rad per person (roll – namn – telefon – e-post) med tunna linjer mellan grupperna */
    .info-rows, .contact-group { break-inside: avoid; }
    .info-rows { font-size: 8pt; }
    .contact-group { padding-bottom: 8pt; border-bottom: 1px solid #ccc; }
    .contact-table { font-size: 7.5pt; }
    .contact-table th, .contact-table td { padding: 1pt 18pt 1pt 0; }
    .page-image { max-height: 6cm; width: auto; }

    tr, li { break-inside: avoid; }
}

/* =========================================================
   Från Blazor-mallen (formulär och felmeddelanden)
   ========================================================= */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: .6rem 1.25rem .7rem;
    background: lightyellow;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}

.blazor-error-boundary {
    padding: 1rem;
    background: #b32121;
    color: white;
}

.blazor-error-boundary::after {
    content: "Ett fel inträffade.";
}

/* =========================================================
   Medlemssidor (/konto)
   ========================================================= */
@media screen and (max-width: 768px) {
    /* Som en app: ingen föreningsheader, inga menyer, inga sponsorer */
    .site--member .club-header,
    .site--member .mobile-bar,
    .site--member .site-right {
        display: none !important;
    }

    .site--member .site-content {
        padding: 0;
    }
}

/* Formulär: etikett till vänster, fält till höger (dator) / etikett ovanför (mobil) */
.form-rows {
    max-width: 640px;
}

.form-row-item {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 10px;
}

.form-row-item > label,
.form-row-item > .form-row-label {
    color: #666;
    font-size: 13px;
    text-align: right;
}

.form-row-fields {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.form-row-fields > input,
.form-row-fields > select,
.form-row-fields .form-control,
.form-row-fields .form-select {
    flex: 1;
    min-width: 0;
}

.form-row-fields .narrow {
    flex: 0 0 110px;
}

.form-divider {
    margin: 18px 0;
    border-top: 1px solid #d5dde8;
}

.form-subhead {
    margin: 10px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d5dde8;
    font-size: 20px;
}

.add-button {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #f7f7f7;
    color: #666;
    font-size: 20px;
    line-height: 1;
}

.segmented {
    display: inline-flex;
    border: 1px solid #ccc;
    border-radius: 3px;
    overflow: hidden;
}

.segmented button {
    padding: 7px 20px;
    border: 0;
    background: #fff;
    color: #777;
}

.segmented button + button {
    border-left: 1px solid #ccc;
}

.segmented button.selected {
    background: #e9ecef;
    color: #222;
}

.member-info-box {
    padding: 12px 14px;
    border: 1px solid #c7dbee;
    border-radius: 3px;
    background: #f0f6fc;
    font-size: 13px;
    line-height: 1.6;
}

.member-save {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 3px;
    background: #2a8ad4;
    color: #fff;
    font-weight: 500;
}

.member-message {
    padding: 10px 14px;
    border-radius: 3px;
    background: #e6f4ea;
    color: #1e5a2d;
}

.member-message--error {
    background: #fdecee;
    color: #8a1c24;
}

.member-card {
    background: #fff;
    border: 1px solid #d5dde8;
    border-radius: 3px;
    margin-bottom: 14px;
}

.member-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 14px;
    border-bottom: 1px solid #d5dde8;
    background: #f8fafc;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.member-card-head::-webkit-details-marker {
    display: none;
}

.member-card-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.member-card-row + .member-card-row {
    border-top: 1px solid #eef1f5;
}

.member-card-muted {
    color: #888;
    font-weight: 400;
    font-size: 14px;
}

.icon-button {
    padding: 6px;
    border: 0;
    background: none;
    color: #bbb;
    line-height: 0;
}

.icon-button.on {
    color: #2a7ab0;
}

@media screen and (max-width: 768px) {
    .form-row-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .form-row-item > label,
    .form-row-item > .form-row-label {
        text-align: left;
        font-size: 15px;
    }
}

/* Spelarstatistik: sorterbara kolumner (som originalet – grå kursiva bokstäver, tooltip "Sortera på …") */
.stats-table th.sortable a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    color: inherit;
    text-decoration: none;
}

.stats-table th.sortable a:hover {
    opacity: .7;
}

.stats-table th.sorted {
    background: #e6e6e6;
}

.stat-letter {
    color: #999;
    font-family: Inter, Roboto, sans-serif;
    font-weight: 800;
    font-style: italic;
    font-size: 17px;
}

.football-icon {
    vertical-align: middle;
}

/* Statistik: M–P tätt ihop som på originalet – smala, centrerade kolumner, spelarnamnet tar resten */
.stats-table th.sortable,
.stats-table td.num {
    width: 37px;
    padding-left: 2px;
    padding-right: 2px;
    text-align: center;
}

/* Statistik: Spelare + Målvakter, sortering på namn, dela */
.stats-section + .stats-section { margin-top: 28px; }
.stats-table th.sortable-name { text-align: left; }
.stats-table th.sortable-name a { color: inherit; text-decoration: none; font-weight: 700; }
.stats-table th.sortable-name a:hover, .stats-table th.sortable-name.sorted a { color: var(--club-primary, #b5121b); }
.stats-table th .football-icon { vertical-align: middle; }
.share-stats { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.share-stats > div { display: flex; gap: 6px; }

/* ---------- Närvarostatistik (/konto/narvaro) ---------- */
.attendance-filter { display: flex; flex-direction: column; gap: 4px; }
.attendance-label { margin-top: 6px; font-size: 14px; color: #333; }
.attendance-range { display: flex; align-items: center; gap: 8px; }
.attendance-range input { max-width: 150px; }
.attendance-types { position: relative; }
.attendance-types > summary { list-style: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attendance-types > summary::-webkit-details-marker { display: none; }
.attendance-types-list {
    position: absolute; z-index: 20; left: 0; right: 0; top: 100%;
    display: flex; flex-direction: column; padding: 6px 0;
    background: #fff; border: 1px solid #ccc; border-radius: 0 0 3px 3px; box-shadow: 0 6px 14px rgba(0,0,0,.12);
}
.attendance-types-list label { display: flex; gap: 8px; align-items: center; padding: 6px 12px; cursor: pointer; }
.attendance-types-list label:hover { background: #f3f6fa; }
.attendance-switches { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 10px; }

/* Grön skjutreglage-switch (checkbox under huven) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch > span {
    position: relative; flex: none; width: 32px; height: 20px; border-radius: 10px; background: #ccc; transition: background .15s;
}
.switch > span::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s;
}
.switch input:checked + span { background: #3cb371; }
.switch input:checked + span::after { transform: translateX(12px); }
.switch input:focus-visible + span { outline: 2px solid #2a7ab0; outline-offset: 2px; }
.switch--muted { color: #777; margin-top: 6px; }

.attendance-head { display: flex; justify-content: space-between; align-items: baseline; margin: 30px 0 10px; }
.attendance-head h2 { margin: 0; font-size: 20px; }
.attendance-head small { color: #999; font-weight: 400; font-size: 18px; }
.attendance-export { position: relative; font-size: 14px; }
.attendance-export > summary { list-style: none; cursor: pointer; color: #2a7ab0; }
.attendance-export > summary::-webkit-details-marker { display: none; }
.caret-down { display: inline-block; border-top: 4px solid currentColor; border-left: 4px solid transparent; border-right: 4px solid transparent; vertical-align: middle; }
.attendance-export-menu {
    position: absolute; right: 0; top: 100%; z-index: 20; min-width: 150px; padding: 4px 0;
    background: #fff; border: 1px solid #ddd; border-radius: 3px; box-shadow: 0 6px 14px rgba(0,0,0,.12);
}
.attendance-export-menu a { display: block; padding: 8px 14px; color: #333; text-decoration: none; }
.attendance-export-menu a:hover { background: #f3f6fa; }

.attendance-card { background: #fff; border: 1px solid #d5dde8; border-radius: 3px; margin-bottom: 10px; }
.attendance-summary { padding: 14px 18px; border-left-width: 4px; }
.attendance-summary-title { font-weight: 700; margin-bottom: 2px; }
.attendance-summary.status-present { border-left-color: #3cb371; }
.attendance-summary.status-present .attendance-summary-title { color: #3cb371; }
.attendance-summary.status-leader { border-left-color: #2a7ab0; }
.attendance-summary.status-leader .attendance-summary-title { color: #2a7ab0; }
.attendance-summary.status-absent { border-left-color: #d9534f; }
.attendance-summary.status-absent .attendance-summary-title { color: #d9534f; }

.attendance-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.attendance-table th { padding: 10px 14px; border-bottom: 1px solid #d5dde8; font-size: 13px; text-align: left; }
.attendance-table td { padding: 10px 14px; vertical-align: top; }
.attendance-table tbody tr + tr td { border-top: 1px solid #eef1f5; }
.attendance-table .num { text-align: right; width: 70px; }
.attendance-table .attendance-date { width: 96px; white-space: nowrap; }
.attendance-table tr.status-present td:first-child { box-shadow: inset 4px 0 #3cb371; }
.attendance-table tr.status-leader td:first-child { box-shadow: inset 4px 0 #2a7ab0; }
.attendance-table tr.status-absent td:first-child { box-shadow: inset 4px 0 #d9534f; }
.attendance-table tr.is-me td { font-weight: 700; background: #f7fbff; }
.attendance-person { display: inline-flex; align-items: center; gap: 8px; }
.attendance-table .muted, .attendance-summary .muted { color: #888; }
.attendance-table .small { font-size: 13px; }
.attendance-note { margin-top: 12px; color: #888; font-size: 13px; }

/* Statistik → Lag: säsongsetikett före seriens namn */
.season-badge {
    display: inline-block;
    padding: 2px 5px;
    margin-right: 4px;
    border-radius: 3px;
    background: #5bc0de;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: 1px;
}
.team-records td { padding-top: 8px; padding-bottom: 8px; }

/* Nästa match / Senaste resultat: hela matchen är en länk till matchsidan */
.match-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.match-link:hover {
    color: inherit;
    text-decoration: none;
}

/* Hovring: kortet lyfts med skugga (som i originalet) – ingen understrykning */
.widget:has(.match-link) {
    transition: transform .15s ease, box-shadow .15s ease;
}
.widget:has(.match-link:hover),
.widget:has(.match-link:focus-visible) {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    position: relative;
    z-index: 2;
}

/* Hela serietabellen (/lag/{slug}/tabell/{id}) */
.standings-page-title { margin: 0 0 14px; font-size: 28px; }
.standings-full td { padding-top: 10px; padding-bottom: 10px; }
.standings-full-team { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Spelarsidan (/lag/{slug}/truppen/{id}) ---------- */
.player-head { display: flex; gap: 30px; align-items: flex-start; margin-bottom: 40px; }
.player-photo {
    flex: 0 0 238px; padding: 4px; border: 1px solid #ddd; border-radius: 3px; background: #fff; line-height: 0;
    display: flex; justify-content: center;
}
.player-photo img { width: 100%; height: auto; }
.player-facts h1 { margin: 2px 0 22px; font-size: 28px; }
.player-facts-table th { padding: 5px 90px 5px 4px; font-weight: 700; text-align: left; }
.player-facts-table td { padding: 5px 4px; }
.player-presentation {
    margin-bottom: 40px; padding: 18px 20px; border: 1px solid #ddd; border-radius: 3px; background: #f5f5f5;
}
.player-presentation > :last-child { margin-bottom: 0; }
.player-stats .player-stats-filters { display: flex; gap: 14px; text-align: left; }
.player-stats td:first-child { text-align: left; }
.player-stats-total td { font-weight: 700; }
.mini-dropdown { position: relative; font-size: 13px; font-weight: 700; }
.mini-dropdown + .mini-dropdown { padding-left: 14px; border-left: 1px solid #ddd; }
.mini-dropdown > summary { list-style: none; cursor: pointer; white-space: nowrap; }
.mini-dropdown > summary::-webkit-details-marker { display: none; }
.mini-dropdown-menu {
    position: absolute; z-index: 20; left: 0; top: calc(100% + 6px); min-width: 170px; padding: 4px 0;
    background: #fff; border: 1px solid #ddd; border-radius: 3px; box-shadow: 0 6px 14px rgba(0,0,0,.12);
}
.mini-dropdown-menu a { display: block; padding: 7px 12px; color: #333; font-weight: 400; text-decoration: none; white-space: nowrap; }
.mini-dropdown-menu a:hover, .mini-dropdown-menu a.active { background: #f3f6fa; }

@media screen and (max-width: 768px) {
    .player-head { flex-direction: column; gap: 16px; }
    .player-photo { flex-basis: auto; width: 200px; }
    .player-facts-table th { padding-right: 40px; }
}

/* =========================================================
   Frågor & svar (/fragor-och-svar) – fristående sida (PlainLayout)
   ========================================================= */
.plain-page { min-height: 100vh; background: #f4f4f4; font-family: Inter, Roboto, Arial, sans-serif; color: #444; }

.faq-head { padding: 34px 16px 40px; background: #fff; border-bottom: 1px solid #e5e5e5; text-align: center; }
.faq-head h1 { margin: 0 0 8px; font-size: 28px; font-weight: 700; color: #444; }
.faq-head p { margin: 0 0 22px; color: #666; font-size: 15px; }
.faq-head a { color: #2a8ad4; text-decoration: none; }
.faq-head a:hover { text-decoration: underline; }

.faq-search { position: relative; max-width: 302px; margin: 0 auto; }
.faq-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #999; }
.faq-search input {
    width: 100%; height: 38px; padding: 0 16px 0 38px;
    border: 1px solid #ccc; border-radius: 19px; background: #fff;
    font-size: 15px; color: #444; outline: none;
}
.faq-search input:focus { border-color: #2a8ad4; }
.faq-search input::placeholder { color: #aaa; }

.faq-body { padding: 44px 16px 60px; }
.faq-card {
    max-width: 600px; margin: 0 auto; padding: 18px 24px 30px;
    background: #fff; border: 1px solid #ddd; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.faq-list { list-style: none; margin: 0; padding: 0; }
.faq-list li { border-bottom: 1px solid #ddd; }
.faq-list a { display: flex; align-items: center; gap: 8px; padding: 13px 0; color: #444; font-size: 15px; text-decoration: none; }
.faq-list a:hover { color: #2a8ad4; }
.faq-doc { flex: none; color: #777; }
.faq-empty { margin: 12px 0 0; color: #777; }

.faq-article { max-width: 760px; padding: 24px 30px 34px; }
.faq-back { color: #2a8ad4; font-size: 13px; }
.faq-article h2 { margin: 20px 0 10px; font-size: 24px; font-weight: 700; color: #444; }
.faq-answer { font-size: 15px; line-height: 1.6; }
.faq-answer p { margin: 0 0 20px; }
.faq-answer a { color: #2a8ad4; text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }
.faq-answer > :last-child { margin-bottom: 0; }

/* Kryssruta med text direkt efter (t.ex. "Avvikande fakturaadress") */
.form-check-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.form-check-row input[type=checkbox] {
    width: 14px;
    height: 14px;
    margin: 0;
}

/* Kalender: matcher länkar till matchsidan, övriga aktiviteter fälls ut (<details>) */
.calendar-body { display: flex; flex-direction: column; }
.calendar-detail { display: block; }
.calendar-time { flex: none; }
a.calendar-link { color: inherit; text-decoration: none; border-radius: 6px; }
a.calendar-link:hover strong, a.calendar-link:focus-visible strong { text-decoration: underline; }
details.calendar-more { display: block; }
details.calendar-more > summary { display: flex; gap: 10px; cursor: pointer; list-style: none; border-radius: 6px; }
details.calendar-more > summary::-webkit-details-marker { display: none; }
details.calendar-more > summary .calendar-body > strong::after { content: " ▾"; font-weight: 400; opacity: .6; }
details.calendar-more[open] > summary .calendar-body > strong::after { content: " ▴"; }
.calendar-extra { margin: 4px 0 6px 52px; font-size: .9em; }
.calendar-extra p { margin: 4px 0 0; white-space: pre-line; }

/* ---------------- Kallelser, dokument och kontakter (medlemsdelen) ---------------- */
.inv-h {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.inv-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 12px;
    padding: 12px 14px;
}

.inv-item + .inv-item {
    border-top: 1px solid #eef1f5;
}

.inv-main {
    flex: 1 1 220px;
    min-width: 0;
}

.inv-when {
    font-size: 13px;
    color: #556270;
    font-weight: 600;
}

.inv-title {
    font-weight: 600;
    margin-top: 2px;
}

.inv-person {
    font-size: 14px;
    margin-top: 2px;
}

.inv-comment {
    flex-basis: 100%;
}

.inv-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #eef1f5;
    color: #384452;
    white-space: nowrap;
}

.inv-badge--yes { background: #e7f6ec; color: #11602e; }
.inv-badge--no { background: #fdecea; color: #9b1c12; }
.inv-badge--open { background: #fef3e2; color: #8a3c06; }

.inv-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.inv-counts--big {
    margin: 0 0 14px;
}

.inv-form {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inv-form .form-control {
    flex: 1 1 200px;
    min-width: 0;
}

.inv-buttons,
.inv-lead-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inv-btn {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid #c8d2de;
    border-radius: 6px;
    background: #fff;
    color: #16202a;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.inv-btn:hover { background: #f3f6f9; }
.inv-btn:focus-visible { outline: 2px solid #1d5fd1; outline-offset: 2px; }
.inv-btn--primary { background: #16202a; border-color: #16202a; color: #fff; }
.inv-btn--primary:hover { background: #2a3744; }
/* Länk som knapp: sajtens länkfärg (.s26 a, även hover = accentfärgen) får inte slå igenom */
.s26 a.inv-btn, .s26 a.inv-btn:hover { color: #16202a; }
.s26 a.inv-btn--primary, .s26 a.inv-btn--primary:hover { color: #fff; }
.inv-btn--yes.on { background: #11602e; border-color: #11602e; color: #fff; }
.inv-btn--no.on { background: #9b1c12; border-color: #9b1c12; color: #fff; }

.inv-remind {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.doc-type {
    flex: 0 0 auto;
    min-width: 44px;
    padding: 4px 6px;
    border-radius: 4px;
    background: #eef1f5;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    color: #384452;
}

.doc-link {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.doc-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.doc-upload label {
    font-weight: 600;
    font-size: 14px;
}

.contact-row {
    flex-wrap: wrap;
}

/* =====================================================================
   Hjälpklasser i stället för style-attribut (CSP: style-src 'self' utan 'unsafe-inline').
   !important = samma företräde som det inline-stilen hade.
   ===================================================================== */
.u-mt-8 { margin-top: 8px !important; }
.u-mt-12 { margin-top: 12px !important; }
.u-mb-16 { margin-bottom: 16px !important; }
.u-m-12 { margin: 12px !important; }
.u-block { display: block !important; }
.u-inline-block { display: inline-block !important; }
.u-flex1 { flex: 1 !important; }
.u-flex-160 { flex: 0 0 160px !important; }
.u-minw-0 { min-width: 0 !important; }
.u-items-start { align-items: flex-start !important; }
.u-col-20 { display: flex !important; flex-direction: column !important; gap: 20px !important; }
.u-gap-20 { gap: 20px !important; }
.u-nowrap { white-space: nowrap !important; }
.u-prewrap { white-space: pre-wrap !important; word-break: break-word !important; margin: 0 !important; }
.u-fs-22 { font-size: 22px !important; }
.u-maxw-640 { max-width: 640px !important; }
.u-va-1 { vertical-align: -1px !important; }
.u-ow-muted { color: var(--ow-muted) !important; }
.u-img-160 { max-width: 160px !important; border-radius: 10px !important; }
.u-img-full { max-width: 100% !important; border-radius: 10px !important; }
.u-w-110 { width: 110px !important; }
.u-w-240 { width: 240px !important; }

/* Spelarbild (Shared/PlayerAvatar.razor) */
.avatar--s24 { width: 24px !important; height: 24px !important; font-size: 9px !important; }
.avatar--s26 { width: 26px !important; height: 26px !important; font-size: 10px !important; }
.avatar--s28 { width: 28px !important; height: 28px !important; font-size: 10px !important; }
.avatar--s32 { width: 32px !important; height: 32px !important; font-size: 12px !important; }
.avatar--s34 { width: 34px !important; height: 34px !important; font-size: 13px !important; }
.avatar--s40 { width: 40px !important; height: 40px !important; font-size: 15px !important; }
.avatar--s44 { width: 44px !important; height: 44px !important; font-size: 16px !important; }
.avatar--s48 { width: 48px !important; height: 48px !important; font-size: 18px !important; }
.avatar--s64 { width: 64px !important; height: 64px !important; font-size: 24px !important; }
.avatar--s96 { width: 96px !important; height: 96px !important; font-size: 36px !important; }
.avatar--s120 { width: 120px !important; height: 120px !important; font-size: 46px !important; }
.avatar--s160 { width: 160px !important; height: 160px !important; font-size: 61px !important; }

/* Seriefärger i matchlistan (TeamMatches.razor, samma ordning som Palette) */
.cc-0 { --chip-bg: #e3edfb; --chip-strong: #7aa7e6; --bar: #7aa7e6; }
.cc-1 { --chip-bg: #e2f3e5; --chip-strong: #76c088; --bar: #76c088; }
.cc-2 { --chip-bg: #fbf2d6; --chip-strong: #e3c25c; --bar: #e3c25c; }
.cc-3 { --chip-bg: #f8e4dc; --chip-strong: #e09c84; --bar: #e09c84; }
.cc-4 { --chip-bg: #f9e1e8; --chip-strong: #e0809b; --bar: #e0809b; }
.cc-5 { --chip-bg: #ece4f9; --chip-strong: #ad8fe0; --bar: #ad8fe0; }
.cc-6 { --chip-bg: #e4e4f9; --chip-strong: #9a9ae0; --bar: #9a9ae0; }
.cc-7 { --chip-bg: #e9e9e9; --chip-strong: #a9a9a9; --bar: #a9a9a9; }

/* Textjustering i redigerad text (RichTextSanitizer gör style="text-align" till klass) */
.rt-align-left { text-align: left; }
.rt-align-center { text-align: center; }
.rt-align-right { text-align: right; }
.rt-align-justify { text-align: justify; }

/* Felsidan (Pages/Error.razor) */
.err-page { max-width: 560px; margin: 64px auto; padding: 0 16px; font-family: system-ui, Segoe UI, Arial, sans-serif; color: #16202a; }
.err-h { font-size: 28px; margin: 0 0 12px; }
.err-p { font-size: 16px; line-height: 1.6; margin: 0 0 16px; }
.err-code { font-family: ui-monospace, Consolas, monospace; font-size: 18px; letter-spacing: .04em; }
.err-home { margin: 24px 0 0; }
.err-home a { color: #1747a6; }

/* QR-koden för autentiseringsappen (Account/Manage/EnableAuthenticator) */
.twofa-qr { display: block; width: 220px; height: 220px; margin: 8px 0 12px; padding: 8px; background: #fff; border: 1px solid #e3e8ee; border-radius: 8px; image-rendering: pixelated; }

/* Inloggning & säkerhet (Account/Manage): luft mellan knappar och avsnitt */
.account-manage .btn { margin: 0 8px 8px 0; }
.account-manage form { margin: 0 0 4px; }
.account-manage form .btn { margin-right: 8px; }
.account-manage h4 { margin-top: 24px; }
.account-manage h3 + p, .account-manage h4 + p { margin-bottom: 14px; }
.account-manage p + form, .account-manage p + .btn, .account-manage p + a.btn { margin-top: 4px; }
