/*
 * Copyright (C) 2024-2026 MOTOR-SPORT-CLUB Marbach e.V. - All rights reserved - https://www.msc-marbach.de
 */

:root {
    color-scheme: light dark;
}

body {
    font-family: sans-serif;
    @media (prefers-color-scheme: light) {
        background: linear-gradient(to bottom, #feffe4 100px, #ffffff 900px);
    }
    background-repeat: no-repeat;
    hyphens: auto;
}

/* Elements are only displayed in dark or light mode */
.only-on-dark {
    display: none;
}
.only-on-light {
    display: block;
}
@media (prefers-color-scheme: dark) {
    .only-on-dark {
        display: block;
    }
    .only-on-light {
        display: none;
    }
}  

.only-on-print {
    display: none;
}

form, .container {
    min-width: 300px;
    max-width: 900px;
    margin: 0 auto;
    padding: 5px;
    padding-top: 10px;
    padding-bottom: 10px;
   /* @media only screen and (min-width: 800px) {
        border: 1px solid;
        border-color: light-dark(#ddd, #444);
        border-radius: 10px;
        padding: 20px;
    }*/
    font-family: sans-serif;
    line-height: 140%;
    position: relative;
}

a[href$=".pdf"]::before {
    content: ' ';
    background: url(pdf-file-icon.webp);
    background-size: contain; /* Scale the image to fit */
    background-repeat: no-repeat;
    background-position: center;
    margin-left: 0px;
    margin-right: 4px;
    vertical-align: middle;
    display:inline-block;  
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
}

/* Header sections */
.flexsection {
    display: flex;
    text-align: left;
}

.headerleft {
    width: 100px;
    min-width: 100px;
    text-align: left;
    overflow: hidden;
}

.headermiddle {
    flex-grow: 1; /* takes remaining space */
    text-align: center;
    overflow: hidden;
}

.headermiddlesmall {
    display: none;
    flex-grow: 1; /* takes remaining space */
    text-align: center;
    overflow: hidden;
}

.headerright {
    width: 75px;
    min-width: 75px;
    overflow: hidden;
}

/* Navigation */
.topnav {
    overflow: hidden;
    background-color: #333;
}

/* Links als Texte/Buttons */
.topnav a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 13px 16px;
    text-decoration: none;
    font-size: 1.1em;
}

/* Change color on hover */
.topnav a:hover {
    background-color: #ddd;
    color: black;
}

/* Burger menu icon */
.topnav .icon {
    display: none;
}

/* Wo das dropdown menu sich befindet links/rechts */
.dropdown {
    float: left;
    overflow: hidden;
}

/* Dropdown menu styles */
.dropdown .dropbtn {
    font-size: 1.1em;    
    border: none;
    outline: none;
    color: white;
    padding: 14px 16px;
    background-color: inherit;
    font-family: inherit;
    margin: 0;
}

/* Kasten des Drop-down menus*/
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

/* Text des Drop-down menus */
.dropdown-content a {
    float: none;
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

/* hovering menu eintraege */
.topnav a:hover, .dropdown:hover .dropbtn {
    background-color: #555;
    color: white;
}

/* hovering dropdown items */
.dropdown-content a:hover {
    background-color: #ddd;
    color: black;
}

/* muss sein, sonst erscheint das dropdown nicht */
.dropdown:hover .dropdown-content {
    display: block;
}

.headline {
    /* empty */
}

/* For right-upper logo */
img.lo1go {
	float: right;
	margin-left: 20px;
	margin-bottom: 20px;
}

hx1 {
    text-align: left;
    font-size: 22px; 
    margin-top: 0; 
    margin-bottom: 25px; 
}

hx3 {
    text-align: left;
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 20px; 
}

hx4 {
    text-align: left;
    font-size: 16px;
    margin-top: 40px;
    margin-bottom: 20px; 
    text-decoration: underline;
}

.light-table {
    border-collapse: collapse;
    margin: 25px 0;
}
.light-table tr {
    text-align: left;
}
.light-table th, .light-table td {
    padding-top: 5px;
    padding-right: 20px;
    padding-bottom: 5px;
    padding-left: 0px;
    /* min-width: 100px; */
    text-align: left;
}
.light-table tr {
    border-bottom: 1px solid;
    border-color: light-dark(#eee, #333);
}

/*a:link {
    color: royalblue;
}

a:visited {
    color: mediumslateblue;
}*/

label {
    display: block;
    margin-bottom: 5px; 
}

label.required:after {
    content: " *";
    color: red;
}

.required-star {
    color: red;
}

.newlyadded-star {
    color: orange;
}

input[type="text"], input[type="email"], input[type="number"], input[type="datetime-local"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid;
    border-color: light-dark(#ccc, #777);
    border-radius: 8px;
    font-size: 16px;
    background-color: light-dark(#f0f0f0, #303030);
}

input[type="checkbox"], input[type="radio"] {
    margin-right: 10px;
    min-height: 15px;
    min-width: 15px;
    max-width: 15px;
    max-height: 15px;
    align-self: start;
}

.category-select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid;
    border-color: light-dark(#ccc, #777);
    border-radius: 8px;
    font-size: 16px;
    background-color: light-dark(#f0f0f0, #303030);
}

.checkbox-container, .radio-container {
    display: flex;
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    margin-bottom: 10px;
}

.input-group input {
    width: 60px;
    margin-right: 10px; 
}

.participant-info {
    font-size: 14px;
    color: light-dark(#555, #aaa);
}

.participantFieldset {
    margin-bottom: 20px;
    border: solid;
    border-width: 1px;
    border-radius: 10px;
    border-color: light-dark(#aaa, #555);
    padding: 15px;
}

.participantLegend {
    font-size: small;
    color: light-dark(#555, #aaa);
}

.account-details {
    margin-left: 60px;
    margin-bottom: 10px;
}

.highlight {
    font-weight: bold;
}

input[type="submit"] {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    margin-bottom: 10px;
    background-color: gold;
    border: 1px solid gold;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease; 
}

input[type="submit"]:hover {
    background-color: #ffc701; 
}

input[type="submit"]:disabled {
    border: 1px solid #C3C3C3;
    background: #F5F5F5;
    color : #C3C3C3;
}

.submitbutton {
    color: black;
}

.donebutton {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    margin-bottom: 10px;
    background-color: gold;
    border: 1px solid gold;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.donebutton:hover {
    background-color: #ffc701;
}

.donebutton {
    color: black;
}

.footer {
    margin-top: 40px;
    text-align: center;
}
.footer p {
    display: inline-block;
    margin: 0 15px;
}


/* Dies ist nur testweise */ 
.event-form {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid;
    border-color: light-dark(#ddd, #444);
    border-radius: 10px;
}

/* Kopfbereich mit Datum, Titel und Buttons */
.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Button-Stile */
.btn {
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 600;
}

/* buttons color schema based on Tailwind palette */
.btn-join {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.btn-join:hover {
  background: linear-gradient(135deg, #15803d, #16a34a);
}

.btn-cancel {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.btn-cancel:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.btn-message {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.btn-message:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.event-buttons {
    display: flex;
    flex-direction: column;   /* Buttons untereinander */
    align-items: flex-end;    /* rechtsbündig */
    margin-bottom: 10px;
    gap: 10px;
}

.event-buttons .btn {
  flex: 1;
  min-width: 110px;
  text-align: center;
}

.btn:disabled {
    background: linear-gradient(135deg, #e0e0e0, #cfcfcf);
    color: #888;
    cursor: not-allowed;
    opacity: 0.9;
    box-shadow: inset 0 2px 3px rgba(0,0,0,0.1);
    transform: none; /* kein Hover-Effekt */
}

@media screen and (max-width: 700px) {
    .topnav a:not(:nth-child(-n+2)), .dropdown .dropbtn {
        display: none;
    }
    .topnav a.icon {
        float: right;
        display: block;
    }
    .topnav.responsive {position: relative;}
    .topnav.responsive .icon {
        position: absolute;
        right: 0;
        top: 0;
    }
    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }
    .topnav.responsive .dropdown {float: none;}
    .topnav.responsive .dropdown-content {position: relative;}
    .topnav.responsive .dropdown .dropbtn {
        display: block;
        width: 100%;
        text-align: left;
    }
    .topic p, .topic ul {
        margin-left: 0px;
    }
    .flexsection .headermiddle {
        display: none;
    }
    .flexsection .headermiddlesmall {
        display: inline;
    }
    .eventcontainer {
        display: block;
    }
    .hidden-on-narrow {
        display: none;
    }
}
