/* Мінімальне оформлення галереї за допомогою Flexbox */
body {
  font-family: "Montserrat";
  font-style: normal;
  color: #2e2f42;
}

ul {
  list-style: none;
}

/* ======================= task 1 =========================================================== */

#categories {
  list-style: none;
  padding: 16px;
  width: 440px;
  height: 888px;
  background: #f6f6fe;
}

.item h2 {
  margin-bottom: 16px;
  padding: 16px; /*  внутрішні відступи */

  font-size: 24px;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: 0.04em;
}

.item ul {
  list-style: none;
  padding-left: 16px;
}

.item li {
  padding: 8px;
  border-bottom: 1px solid #ddd; /*лінії між елементами списку */
  border: 1px solid #ddd; /* рамка */
  border-radius: 8px;
  margin-bottom: 8px;

  font-family: Montserrat;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.item li:hover {
  border: 1px solid #000;
}

/* ======================= task 2 =========================================================== */

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 24px; /* Відстань між картинками */
  list-style: none;
}

.gallery li {
  width: calc((100% - 24px * 2) / 3);
  box-sizing: border-box;
  margin-bottom: 48px; /* Відстань між рядами картинок */
}

.gallery img {
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 12px;
}

/* ======================= task 3 =========================================================== */

#name-input {
  font-family: Montserrat;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  border-radius: 4px;
  border: 1px solid #808080;
}

#name-input:hover {
  border: 1px solid #000;
}

.text {
  display: inline-flex;
  padding: 24px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

#name-output {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: 0.04em;
}

/* ======================= task 4 =========================================================== */

.login-form {
  display: inline-flex;
  padding: 24px;
  flex-direction: column;
  align-items: flex-start;
}

label {
  text-align: left;
  margin-bottom: 8px;

  color: #2e2f42;

  font-family: Montserrat;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 1, 5;
  letter-spacing: 0.04em;
}

input {
  display: flex;
  padding: 8px;
  margin-top: 8px;

  width: 360px;
  /* height: 40px; */
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  border: 1px solid #808080;
}

input:hover {
  border: 1px solid #000;
}

button {
  padding: 8px 16px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;

  border-radius: 8px;
  background: #4e75ff;

  color: #fff;

  font-family: Montserrat;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

button:hover {
  background: #3754ba;
}

/* ======================= task 5 =========================================================== */

/* Стилізація для контейнера .widget */
.widget {
  display: inline-flex;
  padding: 100px 88px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  border-radius: 8px;
  background: #fff;
}

/* Стилізація для абзацу у .widget */
.widget p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1, 5; /* 150% */
  letter-spacing: 0.04em;
}

/* Стилізація для елемента .color у .widget */
.widget .color {
  font-weight: bold;
}

/* Стилізація для кнопки .change-color у .widget */
.widget .change-color {
  background-color: #4e75ff; /* Колір фону кнопки */
  color: #fff; /* Колір тексту кнопки */
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Зміна стилів для кнопки при наведенні */
.widget .change-color:hover {
  background-color: #1c1195; /* Колір фону кнопки при наведенні */
}

/* ======================= task 6 =========================================================== */
#controls {
  display: flex;
  padding: 32px;
  align-items: center;
  gap: 16px;

  border-radius: 8px;
  background: #f6f6fe;
}

#controls input {
  color: #2e2f42;
  width: auto;
  font-family: Montserrat;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.04em;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 60px;
  padding-right: 0px;
  margin-bottom: 4px;
  border-radius: 8px;
  border: 1px solid #808080;
}

#controls input:hover {
  border: 1px solid #000;
}

#controls button[data-create] {
  width: 120px;
  height: 40px;
  border-radius: 8px;
  background: #4e75ff;

  color: #fff;
  padding: 8px 16px;

  font-family: Montserrat;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

#controls button[data-create]:hover {
  background: #2f59f0;
}

#controls button[data-destroy] {
  width: 120px;
  height: 40px;
  border-radius: 8px;
  background: #ff4e4e;

  color: #fff;
  padding: 8px 16px;

  font-family: Montserrat;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

#controls button[data-destroy]:hover {
  background: #d43333;
}

#boxes {
  display: flex;
  align-items: center;
  gap: 16px;

  padding: 32px;
  align-items: flex-start;

  border-radius: 8px;
  background: #f6f6fe;
}

/* ======================= task 7 =========================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* Додано тінь для таблиці */
}

th,
td {
  border: 1px solid #ddd;
  padding: 10px; /* Збільшено відступи */
  text-align: center; /* Вирівнювання чисел по правому краю */
  font-size: 26px;
}

th {
  background-color: #d7d5d5; /* Змінено колір фону заголовків */
  font-weight: bold;
  font-size: 26px;
  text-align: center; /* Центрування тексту в заголовках */
}

#totalCompensation {
  font-weight: bold;
  font-size: 30px;
  margin-top: 20px;
  text-align: center;
  color: #2756d7;
}

h1 {
  text-align: center;
  margin-bottom: 20px; /* Додано відступ знизу */
  margin-top: 60px; /* Додано відступ знизу */
}

h2 {
  margin-left: 20px;
}

#dateHeader,
#tableBody td:nth-child(2) {
  /* Стиль для ячеек даты */
  text-align: center; /* Центрирование текста */
}
