:root {
  --f1-red:   #E10600;
  --f1-white: #FFFFFF;
  --f1-red-rgb:   225, 6, 0;
  --f1-white-rgb: 255 255 255;
  --f1-bg-dark: #494949
}


.bg-bronze { background-color: #cd7f32 !important; }

.icon-bell {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/bell-fill.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/bell-fill.svg") no-repeat center / contain;
  background-color: rgba(100, 0, 0, 0.5);
  transition: background-color 0.2s ease;
}

.icon-bell:hover {
  /* voll deckendes Rot on hover */
  background-color: rgba(100, 0, 0, 5);
}

.icon-info-square {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/info-square.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/info-square.svg") no-repeat center / contain;
  background-color: rgba(var(--f1-red-rgb), 0.6);
  opacity: 0.9;
}


.icon-user {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  mask: url("../svg/person-circle.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/person-circle.svg") no-repeat center / contain;
  background-color: rgba(255,255,255, 1);
  opacity: 0.9;
}

.icon-logout {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/box-arrow-right.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/box-arrow-right.svg") no-repeat center / contain;
  /*color: rgba(var(--f1-red-rgb), 1);    */
}

.icon-menu {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/list.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/list.svg") no-repeat center / contain;  
  background-color: rgba(var(--f1-red-rgb), 1);  
}

.icon-chevron-up{
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/chevron-up.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/chevron-up.svg") no-repeat center / contain;  
  background-color: rgba(var(--f1-red-rgb), 1);  
}

.icon-chevron-down {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/chevron-down.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/chevron-down.svg") no-repeat center / contain;  
  background-color: rgba(var(--f1-red-rgb), 1);  
}

.icon-calendar-week {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/calendar-week.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/calendar-week.svg") no-repeat center / contain;  
  background-color: rgba(var(--f1-red-rgb), 1);  
}

.icon-geo-alt {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/geo-alt.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/geo-alt.svg") no-repeat center / contain;  
  background-color: rgba(var(--f1-red-rgb), 1);  
}

.icon-stopwatch {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/stopwatch.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/stopwatch.svg") no-repeat center / contain;  
  background-color: rgba(var(--f1-red-rgb), 1);  
}

.icon-list-ul {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/list-ul.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/list-ul.svg") no-repeat center / contain;  
  background-color: rgba(var(--f1-red-rgb), 1);  
}

.icon-lightning-fill {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/lightning-fill.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/lightning-fill.svg") no-repeat center / contain;
  background-color: rgba(var(--bs-primary-rgb), 0.1);
    transition:
    color .2s ease-in-out,
    background-color .2s ease-in-out,
    border-color .2s ease-in-out;
}

.icon-lightning-fill:hover {
  /* voll deckendes Rot on hover */
  background-color: rgba(255,255,255, 1);
  transition: background-color 0.2s ease;
}

.icon-flag {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  mask: url("../svg/flag-checkered-solid-full.svg") no-repeat center / contain;
  -webkit-mask: url("../svg/flag-checkered-solid-full.svg") no-repeat center / contain;  
  background-color: rgba(var(--f1-red-rgb), 1);  
}




.bg-f1-dark
{
  background-color: var(--f1-bg-dark);
}

.bg-f1-primary
{
  background-color: var(--f1-red);
}

.bg-f1-primary-transparent {
  background-color: rgba(var(--f1-red-rgb), 0.3);
}

.btn-outline-f1-primary {
    --bs-btn-color: rgba(13, 110, 253,0.6);
    --bs-btn-border-color: rgb(13, 110, 253,0.6);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0d6efd;
    --bs-btn-hover-border-color: #0d6efd;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0d6efd;
    --bs-btn-active-border-color: #0d6efd;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #0d6efd;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #0d6efd;
    --bs-gradient: none
}



.btn-f1-primary {
  background-color: transparent;
  border: 1px solid rgba(var(--f1-red-rgb), 0.8);
  color: rgba(var(--f1-red-rgb), 0.8);
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

.btn-f1-primary:hover {
  background-color: rgba(var(--f1-red-rgb), 0.4);
  color: white;
}

.btn-f1-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}



.btn–f1-transparent { 
  color: rgba(var(--f1-red-rgb), 0.3);
  border-color: rgba(var(--f1-red-rgb), 0.3);
  background-color: transparent;  /* bleibt transparent */
  transition:
    color .2s ease-in-out,
    background-color .2s ease-in-out,
    border-color .2s ease-in-out;
}

/* Hover-/Focus-Zustand: volle Deckkraft */
.btn–f1-transparent:hover,
.btn–f1-transparent:focus {
  color: #fff;
  background-color: rgba(var(--f1-red-rgb), 1);
  border-color: rgba(var(--f1-red-rgb), 1);
}

.f1-text {
  color: var(--f1-red);
}

.border-f1 { 
  border-color: rgba(var(--f1-red-rgb), 1) !important;
}

.border-f1-dark { 
  border-color: rgba(50,50,50,1) !important;
}

/* Header CSS im Design F1 */

/* F1-Header-Titel ---------------------------------------------------- */
.f1-title {
    font-family: 'Titillium Web', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-stretch: condensed;
    letter-spacing: -0.5px;
    color: var(--f1-red);
    margin: 0;

    /* dynamischer „Speed-Strich“ darunter */
    position: relative;
    padding-bottom: .15rem;
}

.f1-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 80px;              /* Länge des Strichs */
    background: var(--f1-red);
    transform: skewX(-30deg); /* leichte Schräglage für „Dynamik“ */
}

header.f1-header {
    position: relative;
    overflow: hidden;
}
header.f1-header::before {
    content:"";
    position:absolute;
    inset:0;
    background:#000;
    transform:skewY(-2deg);
    transform-origin:top left;
    z-index:-1;
}


/* F1 Startseite Schaltflächen */
:host {
  display: inline-block;      /* mehrere Kacheln nebeneinander möglich */
}

.f1-tile{
  display:flex;
  border-radius:.75rem;
  overflow:hidden;
  text-decoration:none;
  background:#121212;
  box-shadow:0 1px 3px rgba(0,0,0,.2);
  transition:transform .2s ease, box-shadow .2s ease;
  cursor:pointer;
}

.f1-tile:hover,
.f1-tile:focus-visible{
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(0,0,0,.35);
  outline:0;
}

/* linker Block: Symbol */
.tile-icon{
  flex:0 0 150px;             /* exakt 150 breit */
  height:100%;                /* exakt 150 hoch */
  background:center / cover no-repeat;
}

/* rechter Block: Text */
.tile-body{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  padding:0 1rem;
  min-width:0;
}

.tile-title{
  color:#fff;
  font:600 1.15rem/1.2 'Titillium Web', system-ui, sans-serif;
  letter-spacing:.5px;
  text-shadow:0 0 4px #000;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* kleine Bildschirme: volle Breite als Notausgang */
@media (max-width: 520px){
  .f1-tile{ width: 100% !important; }
}

.driver-headshot { width:56px; height:56px; object-fit:cover; }
@media (min-width: 768px) {
  .driver-headshot { width:60px; height:60px; }
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.f1-root {
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  overflow: visible;
}

footer {
  flex-shrink: 0;
  margin-top: auto;
  line-height: 1.2;  
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(0,0,0,0.1);
}

.status-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(400px, 90vw);
  background: rgba(50,50,50,0.9);
  box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  transform: translateX(100%);  
  transition: transform 0.35s ease, opacity 0.25s ease;
  z-index: 1050;
  display: flex;
  flex-direction: column;
}

.status-panel.show {
  transform: translateX(0);
  opacity: 1;
}

.status-header {
  background: var(--f1-bg-dark);
}

.status-body {
  flex: 1;
  font-size: 0.9rem;
  color: #bbb;
  overflow-y: auto;
}

@media (max-width: 576px) {
  .status-panel {
    width: 100%;
    height: 50vh;
    bottom: 0;
    top: auto;
    transform: translateY(100%);
  }
  .status-panel.show {
    transform: translateY(0);
  }
}

.placement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 10px);
  gap: 2px;  
}
.placement-cell {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}


.driver-tile {
    min-height: 3.5rem;   /* nach Geschmack anpassen */
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}


.driver-tile .text-truncate {
    white-space: nowrap;       /* verhindert Zeilenumbruch */
}

.position-strip {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr)); /* 10 + SR */
    gap: 0.5rem;
    width: 100%;
}

@media (max-width: 576px) {
    .position-strip {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.position-tile {
    min-height: 3rem;
    justify-content: center;
}

.driver-tile {
    min-height: 3.5rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

@keyframes blink-warning {
  0%   { opacity: 1; }
  50%  { opacity: 0.3; }
  100% { opacity: 1; }
}

.blink-warning {
  animation: blink-warning 2s linear infinite;
}


.tip-modal {
    display: flex;
    flex-direction: column;
    max-height: 90vh;   /* Dialog nicht höher als Viewport */
    max-width: 100vw;
    overflow-x: hidden;
}

.tip-modal .modal-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;   /* Scrollen kapseln wir in drivers-scroll */
}

.tip-modal .drivers-scroll {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: .25rem;
}

/* Mobile: wirklich fullscreen, keine Lücke unter dem Footer */
@media (max-width: 576px) {
    .tip-modal {
        max-height: 100vh;
        height: 100vh;      /* zwingt die modal-content voll in die Höhe */
        border-radius: 0;   /* optional: echte Fullscreen-Optik */
    }

    .tip-modal .modal-body {
        flex: 1 1 auto;
        overflow: hidden;
    }
}

body.modal-open {
    overflow-x: hidden;
}

.modal-backdrop-f1 {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}