:root
{
    --ikonka-main-color: #63750e;
    --ikonka-disabled-btn-color: #444f0e;
    --plain-text-color: black;
    --red-text-color: #cf1920;
    --footer-btn-color: #a3a3a3;
    --disabled-background-color: #3d3d3d;
    --regular-font-size: 0.75rem;
}

.calendar {
    margin-top: 30px;
    width: 70%;
    float: left;
    height: 500px;
}
.obiekt_cal {
    float: left;
    width: 85%;
}
.clear {
    clear: both;
}
.month_button {
    margin-top: 200px;
    float: left;
}

.calendar .swiper-button-prev:after {
    background-image: url(//www.ikonka.eu/themes/blog-ikonka/assets/svg/chevron-left.svg);
}

.calendar .swiper-button-next:after {
    background-image: url(//www.ikonka.eu/themes/blog-ikonka/assets/svg/chevron-right.svg);
}

.calendar .swiper-button-next, .swiper-button-prev {
    display: inline-flex;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    color: #677788;
    width: 3.125rem;
    height: 3.125rem;
    background-color: rgba(255,255,255,.4);
    box-shadow: 0 0.1875rem 0.4375rem 0 rgba(140,152,164,.4);
    border-radius: 50%;
    transition: all .2s ease-in-out;
}

.calendar .swiper-button-next:after, .swiper-button-prev:after {
    width: 1.3rem;
    height: 1.3rem;
    font-family: inherit;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 100% 100%;
    content: "";
}



.calendar .date-display {
    font-weight: bold;
    font-size: 35px;
    color: var(--ikonka-main-color);
}

.calendar table.month th.mon,
.calendar table.month th.tue,
.calendar table.month th.wed,
.calendar table.month th.thu,
.calendar table.month th.fri,
.calendar table.month th.sat,
.calendar table.month th.sun {
    width: 130px;
    height: 50px;
    font-weight: bold;
    color: #247BA0;
    padding: 10px;
}

.calendar tr td {
    width: calc(100% / 7);
    height: 70px;
    padding: 10px;
    border: 1px solid #ddd;
    box-sizing: border-box;
    vertical-align: text-top;
}

.calendar .noday {
    border: 0px solid #ddd;
}

.calendar .today {
    font-weight: bold;
}

.calendar .event {
    width: 100%;
    font-size: var(--regular-font-size);
    padding: 3px;
    background-color: #006d9c;
    color: white;
    border-radius: 5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 17ch;
}

.calendar .event:hover {
    background-color: green;
}

#loading {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--ikonka-main-color);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    animation: spin 2s linear infinite;

    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;

}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


.filters {
    margin-top: 70px;
    width: 30%;
    float: left;
}


.filters h1 {
    margin-left: 20%;
    color: var(--ikonka-main-color);
}

.filters .form-control {
    margin-left: 20%;
    margin-right: 20%;
    width: 60%;
    margin-top: 15px;
}

.filters .buttons{
    margin-top: 30px;
    text-align: center;
}

.filters .buttons button{
    margin: 1%;
    border-color: var(--ikonka-main-color);
    --bs-btn-active-bg: var(--ikonka-main-color);
    background-color: rgba(0, 0, 0, 0);
    color: var(--ikonka-main-color);
}

.results {
    margin-top: 5%;
}

.results h1{
    color: var(--ikonka-main-color);
}

.results .obiekt_results {
    width: 90%;
    margin-left: 5%;
    margin-right: 5%;
}

.results .result-date {
    font-size: 15px;
    padding-left: 10px;
    padding-right: 10px;
    background-color: #006d9c;
    color: white;
    border-radius: 5px;
    margin: 5px;
}

.results .result-date:hover {
    background-color: var(--ikonka-main-color);
}

.results a {
    color: white;
    text-decoration: none;
}


#EventsModal {
    display: none;
    z-index: 20;
    padding: 25px;
    background-color: #e8f4fa;
    box-shadow: 0px 0px 3px black;
    border-radius: 5px;
    width: 550px;
    max-height: 80vh;
    position: fixed;
    min-height: 200px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.events-table {
    width: 100%;
    border-collapse: collapse;
}

.events-table tbody {
    display: block;
    max-height: 60vh;
    overflow: auto;
}

.events-table thead,
.events-table tbody .events-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.events-table thead th {
    text-align: center;
}

#EventsModal a {
    color: var(--ikonka-main-color);
}

.events-table tr td {
    width: 100px !important;
    height: 50px !important;
    padding: 10px !important;
    border: 1px solid #ddd;
}



.events-table tr.highlight{
    border: 2px solid orange;
}

.events-table tr:nth-child(even) {
    background-color: #f9f9f9;
}


.enlarged-image {
    width: 800px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9998;
}

#eventHeader {
    float: left;
    font-size: 18px;
}

#closeButton {
    float: right;
    width: 40px;
    height: 40px;
    background-color: var(--ikonka-main-color);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    color: white !important;
}

#closeButton::before, #closeButton::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60%;
  height: 10%;
  background-color: white;
  transform: translate(-50%, -50%) rotate(45deg);
}

#closeButton::after {
  transform: translate(-50%, -50%) rotate(-45deg); /* Obraca drugą część krzyżyka o -45 stopni */
}

#modalBackDrop {
    display: none;
    top: 0;
    left: 0;
    z-index: 10;
    width: 110vw;
    height: 110vh;
    position: fixed;
    background-color: rgba(0, 0, 0, 0.8);
}


@media (max-width: 1200px){
    .calendar {
        margin-top: 0;
        clear: left;
        width: 100%;
        height: 420px;
    }

    .obiekt_cal {
        width: 100%;
        margin-left: 0%;
        margin-right: 0%;
    }
    .month_button {
        display: none;
    }
    .calendar tr td {
        width: calc(100% / 7);
        height: 50px;
        padding: 1px;
        border: 1px solid #ddd;
        box-sizing: border-box;
        font-size: var(--regular-font-size);
    }
    .calendar .event {
        overflow: hidden;
        width: 40px;
        height: 20px;
        font-size: var(--regular-font-size);
        white-space: normal;
        text-overflow: clip;
    }

    .filters {
        margin-top: 5%;
        clear: left;
        width: 100%;
    }
    .filters h1 {
        display: none;
    }
    .filters .justify-content-between {
        display: none;
    }
    .filters .buttons{
        margin-top: 1px;
    }
    .filters form {
        margin-top: 15px;
    }
    .filters .form-control {
        margin-left: 0%;
        margin-right: 0%;
        width: 100%;
        margin-top: 10px;
    }

    .events-table tbody {
        max-height: 270px;
    }
    .events-table tr td {
        width: 50px ;
        height: 50px;
    }
}


@media (max-width: 950px){
    .container { display: flex; flex-flow: column; }
    .calendar.col-12 { order: 2; }
    .filters.col-12  { order: 1; margin-bottom: 30px; }
    .results.col-12 { order: 3; }
}



@media (max-width: 550px){
    #EventsModal table tr th:nth-child(1),
    #EventsModal table tr td:nth-child(1),
    #EventsModal table tr th:nth-child(2),
    #EventsModal table tr td:nth-child(2) {
      display: none;
    }
    #EventsModal {
        max-width: 350px;
    }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
