/* ============================================================
   boldbillet.dk – moderne facelift ovenpå Bootstrap 3 / Sandstone
   Indlæses EFTER sandstone/bootstrap.min.css (ikke på fansponsor.dk)
   ============================================================ */

/* ---------- Skrifttype: Inter (selv-hostet, variabel font) ---------- */
@font-face {
    font-family: 'InterVariable';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter/InterVariable.woff2') format('woff2');
}

/* ---------- Grundlag ---------- */
html {
    font-size: 15px;
}

body {
    font-family: 'InterVariable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f9fb;
    color: #1f2937;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: inherit;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
}

h3 {
    margin-top: 28px;
    margin-bottom: 16px;
}

a {
    color: #325d88;
}

a:hover,
a:focus {
    color: #23415f;
}

hr {
    border-top: 1px solid #e5e9f0;
}

/* ---------- Navbar: hvid og let ---------- */
body .navbar-default {
    background-color: #ffffff;
    background-image: none;
    border: 0;
    border-bottom: 1px solid #e5e9f0;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    border-radius: 0;
}

body .navbar-default .navbar-brand {
    color: #111827;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 19px;
}

body .navbar-default .navbar-brand:hover,
body .navbar-default .navbar-brand:focus {
    color: #325d88;
}

/* Sandstone tvinger 11px versaler på navbar-links – tilbage til normal skrift */
body .navbar .nav > li > a {
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    line-height: 22px;
}

body .navbar-default .navbar-nav > li > a {
    color: #4b5563;
    font-weight: 500;
    transition: color 0.15s ease;
}

body .navbar-default .navbar-nav > li > a:hover,
body .navbar-default .navbar-nav > li > a:focus {
    color: #325d88;
    background-color: transparent;
}

body .navbar-default .navbar-nav > .active > a,
body .navbar-default .navbar-nav > .active > a:hover,
body .navbar-default .navbar-nav > .active > a:focus {
    color: #325d88;
    background-color: #f0f4f8;
    border-radius: 8px;
}

body .navbar-default .navbar-toggle {
    border-color: #e5e9f0;
    border-radius: 8px;
}

body .navbar-default .navbar-toggle .icon-bar {
    background-color: #4b5563;
}

body .navbar-default .navbar-toggle:hover,
body .navbar-default .navbar-toggle:focus {
    background-color: #f0f4f8;
}

body .navbar-default .navbar-collapse {
    border-color: #e5e9f0;
}

/* ---------- Knapper ---------- */
/* Sandstone tvinger 11px versaler på alle knapper – tilbage til normal skrift.
   Sandstone sætter også border: none, så kanten skal genindføres eksplicit,
   ellers er hvide knapper usynlige på hvide kort */
.btn {
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    text-shadow: none;
    background-image: none;
    box-shadow: none;
    padding: 8px 16px;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-sm {
    font-size: 13px;
    padding: 5px 12px;
}

.btn:active,
.btn.active {
    box-shadow: inset 0 2px 4px rgba(16, 24, 40, 0.1);
}

.btn-primary {
    background-color: #325d88;
    border-color: #325d88;
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:active:hover,
.btn-primary:active:focus {
    background-color: #28496c;
    border-color: #28496c;
    color: #fff;
}

.btn-default {
    background-color: #ffffff;
    border: 1px solid #d7dce3;
    color: #1f2937;
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default:active:hover {
    background-color: #f0f4f8;
    border-color: #c3cad4;
    color: #111827;
}

.btn-success {
    background-image: none;
}

.btn-lg,
.btn-block {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* ---------- Paneler / kort ---------- */
body .panel {
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    background-color: #ffffff;
    overflow: hidden;
}

body .panel-primary {
    border-color: #e5e9f0;
}

body .panel-primary > .panel-heading {
    background-color: #325d88;
    background-image: none;
    border-color: #325d88;
    color: #fff;
    font-weight: 600;
}

body .panel > .panel-heading {
    background-image: none;
}

body .panel-body {
    padding: 16px;
}

/* Kort på forsiden (kampe, sæsonkort, hjemmebaner) */
body .panel-match {
    border: 1px solid #e5e9f0;
    margin-bottom: 0;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.grid-item .panel {
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.grid-item:hover .panel {
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.12);
    transform: translateY(-2px);
    border-color: #c9d4e0;
}

.grid-item .panel-body img {
    border-radius: 6px;
}

/* Eventbilleder i grid-kort får samme format (3:2), så kortene står snorlige.
   contain frem for cover: mange "eventbilleder" er kvadratiske klublogoer,
   som aldrig må beskæres */
.grid-item .panel-body img[src*="event_images"] {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: contain;
}

/* Tekstfoden under kortene (styles lå før inline i mainpage.php) */
body .panel-footer,
body .panel-footer-primary {
    font-size: 11px;
    line-height: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #325d88;
    background-color: transparent;
    background-image: none;
    border: 0;
    padding: 0 12px;
    text-align: center;
    margin-bottom: 28px;
}

body .panel-footer h5 {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin: 10px 0 4px;
    text-transform: none;
    letter-spacing: 0;
}

body .panel-footer .glyphicon {
    color: #6b7280;
}

/* Sæsonkort-footer: blød grøn tone i stedet for den gamle knald-grønne bjælke */
body .panel-footer-success {
    color: #15803d;
    background-color: #f0fdf4;
}

/* På team-siden sidder footeren INDE i kortet (på forsiden ligger den udenfor):
   ingen bund-margin og en tynd skillelinje i stedet */
body .panel .panel-footer {
    margin-bottom: 0;
    padding: 10px 12px 14px;
    border-top: 1px solid #e5e9f0;
    border-radius: 0;
}

body .panel .panel-footer-success {
    border-top: 1px solid #dcefe0;
}

/* Grid-kort som links: undgå blå link-farve på al tekst */
a .panel-footer,
a:hover .panel-footer {
    text-decoration: none;
}

.grid a:hover,
.grid a:focus {
    text-decoration: none;
}

/* ---------- Formularer ---------- */
.form-control {
    border-radius: 8px;
    border: 1px solid #d7dce3;
    background-color: #ffffff;
    color: #1f2937;
    box-shadow: none;
    height: 40px;
    padding: 8px 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.form-control {
    height: auto;
}

.form-control:focus {
    border-color: #325d88;
    box-shadow: 0 0 0 3px rgba(50, 93, 136, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
}

label {
    font-weight: 600;
    color: #374151;
}

.input-group-addon {
    background-color: #f0f4f8;
    border: 1px solid #d7dce3;
    border-radius: 8px;
    color: #6b7280;
    /* samme højde som .form-control (40px), ellers stikker addon'en 2px ud */
    height: 40px;
    padding: 0 14px;
    vertical-align: middle;
}

.input-group .form-control:first-child,
.input-group-addon:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .form-control:last-child,
.input-group-addon:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.checkbox label,
.radio label {
    font-weight: 400;
}

.help-block {
    color: #6b7280;
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: 10px;
    border-width: 1px;
}

/* Sandstone gør links i alerts hvide – usynligt på de nye lyse baggrunde.
   Links arver i stedet boksens farve og understreges. Knapper undtages */
.alert a:not(.btn),
.alert .alert-link:not(.btn) {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

/* ---------- Wells ---------- */
.well {
    background-color: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

/* ---------- Tabeller ---------- */
/* Tabeller vises som kort: hvid flade, kant, runde hjørner og let skygge.
   border-radius kræver border-collapse: separate + radius på hjørnecellerne. */
.table {
    background-color: #ffffff;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    overflow: hidden;
}

/* Sandstones beige linjer og baggrunde → neutrale grå/blå toner.
   Kun vandrette linjer mellem rækkerne – ydre kant kommer fra tabellen selv. */
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
    border: 0;
    border-top: 1px solid #e5e9f0;
    padding: 12px 14px;
}

.table > :first-child > tr:first-child > th,
.table > :first-child > tr:first-child > td {
    border-top: 0;
}

.table > :first-child > tr:first-child > th:first-child,
.table > :first-child > tr:first-child > td:first-child {
    border-top-left-radius: 11px;
}

.table > :first-child > tr:first-child > th:last-child,
.table > :first-child > tr:first-child > td:last-child {
    border-top-right-radius: 11px;
}

.table > :last-child > tr:last-child > th:first-child,
.table > :last-child > tr:last-child > td:first-child {
    border-bottom-left-radius: 11px;
}

.table > :last-child > tr:last-child > th:last-child,
.table > :last-child > tr:last-child > td:last-child {
    border-bottom-right-radius: 11px;
}

.table > thead > tr > th.active,
.table > tbody > tr > th.active,
.table > thead > tr > td.active,
.table > tbody > tr > td.active,
.table > tbody > tr.active > td,
.table > tbody > tr.active > th {
    background-color: #f0f4f8;
}

.table > thead > tr > th.info,
.table > tbody > tr > td.info,
.table > tbody > tr.info > td,
.table > tbody > tr.info > th {
    background-color: #eff6ff;
}

.table > thead > tr > th {
    background-color: #f7f9fb;
    color: #374151;
    font-weight: 600;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9fafb;
}

/* ---------- Modaler ---------- */
.modal-content {
    border-radius: 14px;
    border: 0;
    box-shadow: 0 20px 50px rgba(16, 24, 40, 0.25);
}

.modal-header {
    border-bottom: 1px solid #e5e9f0;
}

.modal-footer {
    border-top: 1px solid #e5e9f0;
}

/* ---------- Pagination ---------- */
.pagination > li > a,
.pagination > li > span {
    color: #325d88;
    border-color: #e5e9f0;
}

.pagination > .active > a,
.pagination > .active > a:hover {
    background-color: #325d88;
    border-color: #325d88;
}

/* ---------- Footer ---------- */
body .footer {
    margin-top: 64px;
    margin-bottom: 0;
    padding: 32px 0 24px;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
    border-top: 1px solid #e5e9f0;
}

body .footer .footer-inner {
    text-align: center;
}

body .footer img {
    opacity: 0.85;
}

body .footer a {
    color: #4b5563;
}

body .footer a:hover {
    color: #325d88;
}

/* ---------- Udsolgt-mærke ---------- */
/* Den røde alarm-boks på forsidens kort bliver en moderne pill.
   !important er nødvendig, fordi bredde/padding står inline i HTML'en */
.panel-body > .alert-danger {
    width: auto !important;
    padding: 4px 12px !important;
    border: 0;
    border-radius: 999px;
    background-color: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.3);
}

/* ---------- Eventbilleder ---------- */
/* Billeder der står direkte i en kolonne (event-siden) indrammes som kort,
   så billeder med hvid baggrund ikke flyder ud i den lyse sidebaggrund */
[class*="col-"] > img.img-responsive,
.page-team p > img {
    background-color: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    padding: 10px;
    max-width: 100%;
    height: auto;
}

/* ---------- Diverse ---------- */
.breadcrumb {
    background-color: transparent;
    padding-left: 0;
}

.label {
    border-radius: 6px;
    font-weight: 600;
}

.tooltip-inner {
    border-radius: 8px;
}
