/* ----------------------------------------
   Globalne
---------------------------------------- */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 20px;
}
.container {
    display: flex;
}
.left, .right {
    padding: 10px;
}
.left {
    width: 30%;
}
.right {
    width: 70%;
}
input, button {
    display: block;
    margin: 8px 0;
    padding: 6px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid grey;
    border-radius: 7px;
}

button{
    position: relative;
    background-color: #2c3e50;
    border: 1px solid #ddd;
    border-radius: 0.25em;
    padding: 0.4em 0.75em;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: white;
    width: auto;
    /* wyrównaj ikonę centralnie */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
/*#next, #prev {
  background-color: #2c3e50;
  color: #fff;
  font-weight: 700;
  border: 1px solid #ddd;
  border-radius: 0.25em;
  padding: 0.4em 0.75em;
  font-size: 0.875em;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 0.2s;
  width: auto;
  position: relative;  żeby pseudo-element się wyrenderował poprawnie 
}

 wstawiamy ikonę jako pseudo-element 
#next, #prev ::before {
  content: "\e901";
  font-family: fcicons !important;
  speak: none;
  display: inline-block;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-decoration: inherit;
  text-transform: none;
  line-height: 1;
   ewentualnie dopasuj rozmiar ikony: 
  font-size: 1.25em;
  margin-right: 0.35em;
  vertical-align: middle;
}*/

/* przyciski nawigacji w .cal-header */
.cal-header button#prev,
.cal-header button#next {
    position: relative;
    background-color: #2c3e50;
    border: 1px solid #ddd;
    border-radius: 0.25em;
    padding: 0.4em 0.75em;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: white;
    width: auto;
    /* wyrównaj ikonę centralnie */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* pseudo-element z ikoną z fcicons */
.cal-header button#prev::before {
    content: "\e900";
    font-family: fcicons !important;
    /*font-size: 1.2em;*/
}

.cal-header button#next::before {
    content: "\e901"; /* albo inny kod ikony dla prawej strzałki */
    font-family: fcicons !important;
    /*font-size: 1.2em;*/
}



.error {
    color: #a00;
}
.success {
    color: #0a0;
}

/* ----------------------------------------
   Zakładki
---------------------------------------- */
.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    border-bottom: 3px solid #c4c4c4;
}
.tabs .tab {
    margin-right: 10px;
}
.tabs .tab a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    border: 1px solid transparent;
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    background: #c4c4c4;
}
.tabs .tab.active a {
    border-color: #ccc;
    border-bottom-color: white;
    background: #03b400;
    font-weight: bold;
    color: white;
}

/* ----------------------------------------
   Miesięczny widok kalendarza
---------------------------------------- */
/* Stylujemy tylko tabelę z klasą .monthly-calendar */
#calendar > table.monthly-calendar {
    width: 100%;
    table-layout: fixed;      /* równe kolumny */
    border-collapse: separate; /* oddzielne granice komórek */
    border-spacing: 4px;
    margin-bottom: 20px;
}
/* Nagłówki dni */
#calendar > table.monthly-calendar th {
    background-color: #c6c6c6;
    color: #333;
    font-weight: 500;
    text-align: center;
    padding: 8px;
    border-bottom: 3px solid red;
    font-weight: 700;
}
/* Komórki z dniami */
#calendar > table.monthly-calendar td {
    vertical-align: top;
    min-height: 80px;
    padding: 8px;
    border-bottom: 1px solid red;
    border-right: 1px solid #eee;
    position: relative;
}

#calendar > table.monthly-calendar td,
#calendar > table.monthly-calendar th {
    border-radius: 8px;
    /* jeśli chcesz tylko górne rogi: border-radius: 8px 8px 0 0; */
}
/* Usuń dolną granicę ostatniego wiersza */
#calendar > table.monthly-calendar tr:last-child td {
    border-bottom: 1px solid red;
}
/* Usuń prawą granicę ostatniej kolumny */
#calendar > table.monthly-calendar td:last-child,
#calendar > table.monthly-calendar th:last-child {
    border-right: none;
}
/* Nagłówki soboty i niedzieli */
#calendar > table.monthly-calendar th:nth-child(6),
#calendar > table.monthly-calendar th:nth-child(7) {
    background-color: #c6c6c6;  /* kolor tła tylko dla <th> */
}

/* Komórki soboty i niedzieli */
#calendar > table.monthly-calendar td:nth-child(6),
#calendar > table.monthly-calendar td:nth-child(7) {
    background-color: #e6e3e3; /* inny kolor tła dla <td> */
}
/* Hover na komórce */
#calendar > table.monthly-calendar td:hover {
    background-color: #fcfcfc;
}
/* Wyróżnienie zarezerwowanego dnia (łagodniejsze) */
#calendar > table.monthly-calendar td.booked {
    background-color: rgba(255, 136, 136, 0.4);
}
/* (opcjonalnie) wyróżnienie dnia dzisiejszego,
   jeśli dodasz w JS klasę .today */
#calendar > table.monthly-calendar td.today {
    background-color: rgba(255, 222, 173, 0.4);
}

/* ----------------------------------------
   Inne komponenty
---------------------------------------- */
/*.cal-header {
  text-align: center;
  margin-bottom: 6px;
}
.cal-header button {
  width: auto;
  display: inline-block;
}*/
.logout {
    float: right;
    text-decoration: none;
    color: #ffffff;
    background: red;
    padding: 8px 12px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;

    font-size: 1.2em;
    border: 1px solid transparent;
    border-bottom: none;
}
.login-form {
    max-width: 300px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ccc;
}
.login-form input,
.login-form button {
    width: 100%;
    margin: 8px 0;
}


/* ----------------------------------------
   Nagłówek miesięcznego kalendarza (.cal-header)
---------------------------------------- */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.5em;
    background: #fff;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 0.25em 0.25em 0 0;
}

/* Tytuł miesiąca */
.cal-header-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    font-size: 1.75em;
}

/* Przycisk FC-style w `.cal-header` */
.cal-header .fc-button {
    margin: 0;
    padding: 0.4em 0.75em;
    font-size: 0.875em;
    line-height: 1.5;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 0.25em;
    cursor: pointer;
    transition: background-color 0.2s;
}
.cal-header .fc-button:hover {
    background-color: #e9ecef;
}
.cal-header .fc-button:active {
    background-color: #dee2e6;
}
.cal-header .fc-button:disabled {
    opacity: 0.5;
    cursor: default;
}


/* Podstawowe style dla komórek z tooltipem */
#calendar .monthly-calendar td.has-tooltip {
    position: relative;
    cursor: pointer;
}

/* Ukrywany domyślnie tooltip */
#calendar .monthly-calendar td.has-tooltip::after {
    content: attr(data-tooltip);
    white-space: pre;          /* zachowuje nowe linie */
    position: absolute;
    bottom: 100%;              /* nad komórką */
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    line-height: 1.2;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
    z-index: 10;
}

/* Trianglik pod tooltipem */
#calendar .monthly-calendar td.has-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    border: 6px solid transparent;
    border-top-color: rgba(0,0,0,0.75);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
    z-index: 10;
}

/* Po najechaniu – pokazujemy tooltip */
#calendar .monthly-calendar td.has-tooltip:hover::after,
#calendar .monthly-calendar td.has-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}





/*--------------------ADMIN-------------------*/

/* ----------------------------------------
   Styl listy zarządzania rezerwacjami
---------------------------------------- */
table.management {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.95em;
}
table.management th,
table.management td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
}
table.management th {
    background-color: #f4f4f4;
    font-weight: 600;
}
table.management tr:nth-child(even) {
    background-color: #fafafa;
}
table.management tr:hover {
    background-color: #f1f1f1;
}
table.management button {
    padding: 4px 8px;
    font-size: 0.9em;
}
