:root {
  --bg-color: #1ef090;
  --bg-active-color: #18c173;
  --bg-hover-color: #21d983;
  --color: #2b2b2b;
  --border-color: #fff;
  --warning-color: #b02a37;
  --warning-hover-color: #a02632;
  --warning-active-color: #8a212b;
  --warning-bg-color: #f8d7da;
  --warning-border-color: #f1aeb5;
  --wrest-day-color: #f00;
  --bg-days-list: #fff;
}

.leftPanel {
  display: none !important;
}

.centralpanel {
  width: 85% !important;
}

.main-calendar-container {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  width: 100%;
  column-gap: 1rem;
}

.school-year-settings ::selection {
  background-color: var(--color);
  color: var(--bg-color);
}

.school-year-settings * {
  color: var(--color);
  font-weight: bold;
}

.school-year-settings * {
  font-size: 1rem;
}

.school-year-settings {
  position: relative;
  display: inline-block;
  padding: 1rem;
  box-sizing: border-box;
  background-color: var(--bg-color);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  border-radius: .3rem;
  width: 20rem;
}

.calendar-panel {
  position: relative;
  display: inline-block;
}

.school-year-settings details {
  margin-bottom: 1rem;
}

.school-year-settings summary,
.button-add {
  cursor: pointer;
  margin-bottom: 0.5rem;
  border: 1px var(--border-color) solid;
  border-radius: .3rem;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25);
  list-style: none;
  padding: .5rem;
  white-space: nowrap;
  text-align: center;
}

.button-add {
  background-color: var(--bg-color);
}

.school-year-settings summary:hover,
.button-add:hover {
  background-color: var(--bg-hover-color);
}

.school-year-settings details>div {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: .3rem;
  text-align: center;
}

.school-year-settings input[type="date"] {
  padding: .2rem;
  font-size: .9rem;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25);
  width: 100%;
  box-sizing: border-box;
}

.school-year-settings details ul {
  text-align: left;
  padding: 0;
  list-style: none;
  margin: 0;
}

.holidays-list li {
  display: grid;
  grid-template-columns: auto auto 1fr;
}

.school-holidays .button {
  cursor: pointer;
  border: none;
  border-radius: .3rem;
  background-color: var(--bg-color);
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25);
  list-style: none;
  padding: .5rem;
  text-align: center;
}

.school-holidays .button:hover {
  background-color: var(--bg-hover-color);
}

.school-holidays .button>svg {
  position: relative;
  display: block;
}

.school-holidays li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: .5rem;
  margin: .5rem 0;
}

.warning {
  position: relative;
  padding: 1rem;
  color: var(--warning-color);
  background-color: var(--warning-bg-color);
  border: 1px var(--warning-border-color) solid;
  border-radius: .3rem;
  text-align: left;
  margin-top: .5rem;
}

.warning::selection {
  background-color: var(--warning-color);
  color: var(--warning-bg-color);
}

.school-year-settings summary:active,
.button-add:active,
.school-holidays .button:active {
  background-color: var(--bg-active-color);
}

.checkbox-item {
  text-align: left;
}

.wrest-days {
  background-color: var(--bg-days-list);
  padding: 1rem !important;
  border-radius: .3rem;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25);
}

.select-color * {
  text-align: left;
}

.wrest-days input[type="checkbox"]:checked+label::before {
  background-color: var(--wrest-day-color);
  border-color: var(--wrest-day-color);
}

.wrest-days input[type="checkbox"]:checked+label {
  color: var(--wrest-day-color);
}

.wrest-days input[type="checkbox"]:checked+label::selection {
  color: var(--bg-days-list);
  background-color: var(--wrest-day-color);
}

.school-year-settings input[type="color"] {
  display: none;
}

.school-year-settings input[type="color"]+label {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
}

.school-year-settings input[type="color"]+label::before {
  content: '';
  position: relative;
  width: 1.2rem;
  height: .8rem;
  border: 1px #000 solid;
  border-radius: 2px;
  margin-right: .5rem;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.25);
  background-color: var(--_pickedColor, #fff);
}

.select-color {
  text-align: left;
}

.input-dates-dialog::backdrop,
.remove-dates-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.32);
}

.input-dates-dialog,
.remove-dates-dialog {
  border: none;
  border-radius: .5rem;
  box-shadow: none;
  width: 30%;
  padding: 0;
  overflow: hidden;
}

.dialog-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  color: var(--color);
  border-bottom: 1px #808080 solid;
  padding: 1rem;
  box-sizing: border-box;
}

.dialog-header>.close-dialog.x {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  box-sizing: border-box;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: .2rem;
}

.dialog-header>.close-dialog.x:hover {
  color: #7f2b2b;
}

.dialog-header>.close-dialog.x:active,
.dialog-header>.close-dialog.x:focus-visible {
  outline: 4px #c2fedb solid;
}

.dialog-header>.close-dialog.x>svg {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

.dialog-header>h2 {
  margin: 0;
}

.dialog-body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  padding: 1rem;
  font-size: 110%;
  color: var(--color);
}

.dialog-body input[type="date"] {
  padding: .2rem;
  font-size: 110%;
  color: var(--color);
}

.dialog-body p.alert {
  display: none;
  grid-column: 1/3;
  text-align: center;
}


.dialog-body.error p.alert {
  display: block;
  color: var(--warning-color);
}

.dialog-body.correct input[type="date"] {
  border: 2px var(--bg-color) solid;
}

.dialog-body.error input[type="date"] {
  border: 2px var(--warning-color) solid;
}

.dialog-body.error input[type="date"]:focus-visible {
  border: 2px var(--warning-color) solid;
  outline: 1px var(--warning-bg-color) solid;
}

.dialog-footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  justify-items: right;
  border-top: 1px #808080 solid;
  padding: 1rem;
  box-sizing: border-box;
  column-gap: 1rem;
}

.dialog-footer button,
.generate-button,
.save-calendar-button {
  position: relative;
  width: fit-content;
  padding: .5rem 1rem;
  box-sizing: border-box;
  cursor: pointer;
  border: none;
  border-radius: .4rem;
  font-weight: bold;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25);
}

.dialog-close-button {
  color: var(--border-color);
  background-color: var(--color);
  opacity: .6;
}

.dialog-close-button:hover {
  opacity: .8;
}

.dialog-close-button:active {
  opacity: 1;
}

.dialog-save-button,
.generate-button,
.save-calendar-button {
  color: var(--color);
  background-color: var(--bg-color);
}

.dialog-save-button:hover,
.generate-button:hover,
.save-calendar-button:hover {
  background-color: var(--bg-hover-color);
}

.dialog-save-button:active,
.generate-button:active,
.save-calendar-button:active {
  background-color: var(--bg-active-color);
}

.generate-button,
.save-calendar-button {
  display: block;
  margin: auto;
}

.calendar-container>div:has(.save-calendar-button) {
  margin-top: 1rem;
}

.remove-dates-dialog .dialog-body>p {
  grid-column: 1/3;
}

.dialog-remove-button {
  color: var(--border-color);
  background-color: var(--warning-color);
}

.dialog-remove-button:hover {
  background-color: var(--warning-hover-color);
}

.dialog-remove-button:active {
  background-color: var(--warning-active-color);
}

.calendar-container {
  margin-top: .5rem;
  background-color: #fffc;
  padding-bottom: 1rem;
  box-sizing: border-box;
  border-bottom-left-radius: .3rem;
  border-bottom-right-radius: .3rem;
}

@media screen and (max-width: 768px) {
  .centerPanel {
    width: 100vw !important;
    padding: 0;
  }

  .school-year-settings {
    min-height: calc(100vh - 32px - 12rem);
  }

  .school-year-settings * {
    font-size: .8rem;
  }

  .school-year-settings:not(.show) {
    width: 2rem;
    padding: 2px;
    overflow: hidden;
    cursor: pointer;
  }

  .school-year-settings:not(.show) * {
    display: none;
  }

  .right-block {
    position: absolute;
    display: block !important;
    right: 0;
    top: 0;
    width: 2rem;
    height: 100%;
    border-radius: .3rem;
    box-sizing: border-box;
    cursor: pointer;
  }

  .school-year-settings.show .right-block {
    right: 1rem;
    top: 1rem;
    height: calc(100% - 2rem);
    border: 1px var(--border-color) solid;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25);
  }

  .school-year-settings.show {
    padding-right: 4rem;
  }

  .school-year-settings .right-block::before {
    content: '';
    position: relative;
    transform: rotate(-90deg) translateX(-50%);
    white-space: nowrap;
    display: block;
    top: 50%;
    color: var(--color);
    font-weight: bold;
    letter-spacing: .5rem;
  }

  .school-year-settings:not(.show) .right-block::before {
    content: 'Параметри';
  }

  .school-year-settings.show .right-block::before {
    content: 'Згорнути';
  }

  /* .main-calendar-container {
    width: 98vw;
  } */

  .main-calendar-container:has(.show) {
    grid-template-columns: 1fr;
  }

  .input-dates-dialog,
  .remove-dates-dialog {
    width: 98%;
  }

  input[type="checkbox"]+label::before {
    width: 30px;
    height: 30px;
    font-size: 28px !important;
    line-height: 26px !important;
  }

  input[type="checkbox"]+label {
    line-height: 2rem;
    vertical-align: middle;
    display: inline-block;
    padding-left: 40px;
  }
}