/* Inhaltliches Layout */


/* Buttons */
button,
input[type="submit"] {
    background-color: #336699;
    color: white;
    border: none;
    /*padding: 0.5em 1em;*/
    /*margin-top: 1em;*/
    cursor: pointer;
}

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

.button-primary,
.button-secondary {
    display: inline-block;
}

.button-primary,
input[type="submit"],
button[type="submit"] {
    background-color: #336699;
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.button-primary:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: #003366;
    transform: translateY(-1px);
}

a.button-primary {
    display: inline-block;
    background-color: #336699;
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    font: inherit;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 0.6rem;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    text-decoration: none;
    line-height: 1.2;
    height: auto;
}

a.button-primary:hover {
    background-color: #003366;
}

.button-secondary {
    background-color: #eee;
    color: #333;
    border: 1px solid #ccc;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 0.6rem;
    transition: background-color 0.2s ease-in-out;
}

.button-secondary:hover {
    background-color: #ddd;
}

a.button-secondary {
    display: inline-block;
    background-color: #eee;
    color: #333;
    border: 1px solid #ccc;
    padding: 0.5rem 1.2rem;
    font: inherit;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 0.6rem;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    text-decoration: none;
    line-height: 1.2;
    height: auto;
}

a.button-secondary:hover {
    background-color: #ddd;
}

/* Formulare */
form label {
    display: block;
    margin-top: 1em;
    font-weight: bold;
}

form input,
form textarea {
    width: 100%;
    padding: 0.5em;
    margin-top: 0.3em;
    box-sizing: border-box;
}

/* Footer */
footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 1em;
    margin-top: 2em;
    font-size: 0.9em;
}

/* Style for Login */
.login-container {
  max-width: 400px;
  margin: 3rem auto;
  padding: 2rem;
  border: 1px solid #ccc;
  background: #f9f9f9;
  border-radius: 5px;
}

.login-container h2 {
  margin-bottom: 1rem;
}

.login-container button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
}

/* Style for integrated Login */
.login-box {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 4rem auto;
}

.message {
    background-color: #e0f7fa;
    border-left: 4px solid #00796b;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #004d40;
    border-radius: 4px;
}

ul.messages {
    list-style: none;
    margin: 0;
    padding: 1rem;
    background-color: #e0f7fa;
    color: #004d40;
    font-weight: bold;
    border-top: 2px solid #004d40;
    border-bottom: 2px solid #004d40;
    width: 100%;   /* volle Breite */
}

.login-wrapper {
    max-width: 400px;
    margin: 3rem auto;
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-wrapper h2 {
    margin-top: 0;
    text-align: center;
    color: #002244;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.3rem;
}

.login-form input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn {
    background-color: #002244;
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    width: 100%;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
}

.btn:hover {
    background-color: #003366;
}

.form-errors {
    background-color: #ffcdd2;
    color: #b71c1c;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.form-errors:empty {
  display: none;
}

.hidden {
  display: none;
}



/* Sidebar */

.sidebar {
    position: fixed;
    top: 75px; /* Höhe deines Headers anpassen */
    left: 0;
    width: 65px;
    height: calc(100vh - 75px);
    background-color: #f0f0f0;
    overflow-x: hidden;
    transition: width 0.3s ease;
    z-index: 1000;
}

.sidebar:hover {
    width: 205px;
}

.sidebar nav {
    padding-top: 1.2rem;
}

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

.sidebar li {
    padding: 0;
    margin-bottom: 1.2rem;
}

.sidebar a {
    display: flex;
    width: 170px;
    align-items: center;
    gap: 1.2rem;
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.sidebar a:hover {
    color: white;
    background-color: #336699;     /* HINTERGRUND ändert sich nur beim Link */
}

/* Nur das Symbol zeigen, wenn eingeklappt */
.sidebar.collapsed a span {
    display: none;
}

.sidebar a i {
    min-width: 1.2rem;
    text-align: center;
}

.sidebar.collapsed nav ul li a {
    padding-left: 0;
    justify-content: center;
}

.tagesansicht-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tagesansicht-tabelle td {
    border-bottom: 1px solid #ddd;
    padding: 0.4rem;
    vertical-align: top;
}

.tagesansicht-tabelle .zeit {
    width: 80px;
    font-weight: bold;
    color: #555;
    background-color: #f5f5f5;
    text-align: right;
}

.terminzelle .termin {
    background-color: #e1f5fe;
    border-left: 3px solid #0277bd;
    padding: 0.3rem 0.5rem;
    margin: 0.2rem 0;
    border-radius: 3px;
}

/* Terminblock */
.terminzelle {
    position: relative;
    padding: 0;  /* damit Terminblock an die Zellkante reicht */
}

.terminblock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;  /* <-- das ist die Änderung */
    
    font-size: 0.85rem;
    line-height: 1.1;

    text-decoration: none;
    color: inherit;

    /*background-color: #cce5ff;
    border-left: 4px solid #004085;*/
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease-in-out;
}

.terminblock:hover {
    background-color: #b8daff;
    cursor: pointer;
}

.tooltiptext {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  padding: 0.6rem;
  border-radius: 5px;
  position: absolute;
  z-index: 10;
  bottom: 100%;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.terminblock:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

a.terminblock {
    display: block;
    text-decoration: none;
    color: inherit;
}

.status-confirmed {
    border-left: 4px solid #2e7d32; /* Grün */
    background-color: #e8f5e9;
}

.status-tentative {
    border-left: 4px solid #f9a825; /* Gelb */
    background-color: #fffde7;
}

.status-cancelled {
    border-left: 4px solid #c62828; /* Rot */
    background-color: #ffebee;
}

/* Kalender-Tabelle */
.kalender-tabelle {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.95rem;
    border: 1px solid #ccc; /* äußere Umrandung */
}

/* Tabellenzellen */
.kalender-tabelle th,
.kalender-tabelle td {
    border: 1px solid #ccc;
    padding: 0.4rem 0.6rem;
    vertical-align: top;
}

/* Spaltenbreiten */
.kalender-tabelle th.zeit,
.kalender-tabelle td.zeit {
    width: 80px;
    background-color: #f5f5f5;
    text-align: right;
    white-space: nowrap;
}
/* Jede volle Stunde optisch absetzen */
.kalender-tabelle tr:nth-child(4n+1) td {
    background-color: #f5f5f5;
}

.kalender-tabelle th.terminzelle,
.kalender-tabelle td.terminzelle {
    width: calc(100% - 80px); /* restliche Breite */
}
/* Verhindert dritte Spalte bei rowspan */
.kalender-tabelle tr {
    display: table-row;
}

/* Zeitspalte */
.zeit {
    width: 80px;
    font-weight: bold;
    text-align: right;
    background-color: #eef;
    padding-right: 0.8rem;
}

@media (max-width: 768px) {
  .kalender-tabelle {
    font-size: 0.8rem;
  }

  .zeit {
    width: 60px;
  }

.terminblock {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* vertikal zentriert */
    font-size: 0.65rem; /* oder z. B. 12px */
    color: inherit;
    text-decoration: none;
    background-color: #cce5ff;
    border-left: 4px solid #004085;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease-in-out;
}

a.terminblock {
    display: block;
    text-decoration: none;
    color: inherit;
}

}

/* Optional: Jede volle Stunde dunkler */
.kalender-tabelle tr:nth-child(4n+1) td {
    background-color: #f0f8ff;
}

form table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1.5rem;
}

form th {
    text-align: left;
    padding: 0.5rem;
    width: 30%;
}

form td {
    padding: 0.5rem;
}

form td input,
form td select {
    width: 100%;
    padding: 0.4rem;
}

.btn-secondary {
    background-color: #eee;
    color: #222;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #ccc;
    display: inline-block;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background-color: #ddd;
}

/* Optional: + Neuer Termin */
.btn-klein {
    background-color: #4caf50;
    color: white;
    height: 2.2rem;
    border: none;
    padding: 0.4rem 0.9rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
    margin-top: 0;
    margin-bottom: 0;
}

.btn-klein:hover {
    background-color: #388e3c;
}

.kalender-navigation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0;
  border: none;
  border-radius: 8px;
  gap: 0.6rem;
}

.kalender-navigation-bar form {
  display: block;
  margin: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
}

.kalender-button-group {
  display: flex;
  align-items: stretch;
  height: 2.2rem;
}

.kalender-button-group {
  margin: 0;
  padding: 0;
}

.kalender-button-group a {
  background-color: #48afe6;
  color: white;
  /*border: none;
  /*border-radius: 0;*/
  padding: 0 1.2rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  align-content: center;
  cursor: pointer;
  height: 100%;
  /*border-radius: 0;*/
  transition: background-color 0.2s ease;
}

.kalender-button-group a:hover {
  background-color: #336699;
  color: white;
  border: none;
}

.kalender-button-group .nav-prev {
    border-radius: 6px 0 0 6px;
}

.kalender-button-group .nav-next {
    border-radius: 0 6px 6px 0;
}

.kalender-heute {
  background-color: #e0e0e0;
  color: #333;
  min-width: 8em;
  padding: 0 0.9rem;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  height: 100%;
  white-space: nowrap;
}



.wochenansicht {
  display: flex;
  padding: 1rem;
}

.wochentag-spalte {
  flex: 1;
  border: 1px solid #ccc;
  margin-right: 0.5rem;
}

.wochentag-kopf {
  background-color: #eee;
  padding: 0.5rem;
  font-weight: bold;
  text-align: center;
}

.zeitslots {
  display: flex;
  flex-direction: column;
}

.zeitslot {
  height: 2rem;
  border-top: 1px solid #ddd;
  padding-left: 0.5rem;
  line-height: 2rem;
  font-size: 0.85rem;
}




/*.ansicht-container {
    display: flex;
    align-items: stretch;
}*/

.ansicht-umschalter {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  line-height: 1;
}

.ansicht-umschalter a {
  display: inline-flex;
  align-items: center;
  padding: 0.5em 1.2em;
  border-right: 1px solid #ccc;
  text-decoration: none;
  background-color: #f8f8f8;
  color: #333;
  font-weight: 500;
}

.ansicht-umschalter a:hover {
  background-color: #eaeaea;
  transform: none;
}

.ansicht-umschalter a:last-child {
  border-right: none;
}

.ansicht-umschalter a.aktiv {
  background-color: #336699;
  color: white;
}

.ansicht-umschalter a.aktiv:hover {
  background-color: #336699;
  color: white;
}

.kalender-label {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}




.kalender-settings-link {
    font-size: 1.6rem;
    margin-left: 1rem;
    text-decoration: none;
    color: #666;
}

.kalender-settings-link:hover {
    color: #000;
}







/* Kalender-Headerbar */

.kalender-headerbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;

  padding: 0.5rem 0 0 0;
}

.kalender-summary{
  display:flex;
  align-items:center;
  gap:0.6rem;
  cursor:pointer;
  user-select:none;
  padding:0.45rem 0.7rem;
  border:1px solid #ddd;
  border-radius:10px;
  background:#fff;
}

.kalender-dropdown {
    position: relative;
}

.kalender-dropdown[open] .kalender-summary{
  box-shadow:0 6px 20px rgba(0,0,0,0.08);
}

.kalender-dot{
  width:12px;
  height:12px;
  border-radius:999px;
  display:inline-block;
  border:1px solid rgba(0,0,0,0.15);
}

.kalender-dot-neutral {
    background: linear-gradient(135deg, #ccc, #eee);
}

.kalender-caret{
  opacity:0.6;
  font-size:0.9rem;
}

.kalender-menu {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-4px);
    transition: 0.15s ease;
    pointer-events: none;
}

details[open] .kalender-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.kalender-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
}

.kalender-menu-item{
  display:flex;
  align-items:center;
  gap:0.6rem;
  padding:0.55rem 0.75rem;
  text-decoration:none;
  color:inherit;
}

.kalender-menu-item:hover{
  background:#f6f6f6;
}

.kalender-menu-item.is-active{
  background:#eef4ff;
}

.kalender-menu-sep{
  height:1px;
  background:#eee;
  margin:0.25rem 0;
}

.icon-button{
  text-decoration:none;
  padding:0.35rem 0.55rem;
  border:1px solid #ddd;
  border-radius:10px;
  background:#fff;
}


/* speziell für Kalender-Header in der Terminliste */

.kalender-headerbar.terminliste {
    justify-content: flex-start;   /* statt space-between */
}

.terminliste-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    flex: 1;
    flex-wrap: nowrap;
}

.terminliste-filter input {
    flex: 1;
    min-width: 200px;
}





.ansicht-toggle {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  line-height: 1;
}

.ansicht-umschalter a,
.kalender-toggle {
    height: 100%;
}






@media (max-width: 768px) {
  .layout-container {
    flex-direction: column;
  }

  .sidebar {
    position: absolute;
    left: 0;
    top: 60px; /* Höhe des Headers */
    height: calc(100vh - 60px);
    width: 200px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  }

  .sidebar.visible {
    transform: translateX(0);
  }

  .movebar {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
  }

  main {
    padding-top: 2rem;
  }
}
