/* Кнопка «Добавить в календарь» в верхнем таббаре (только иконка, как режим презентации) */
.btn-save-load.btn-calendar-add {
  padding: 6px 10px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  box-sizing: border-box;
}

.btn-calendar-add .icon-calendar {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity 0.3s;
}

.btn-calendar-add:hover .icon-calendar {
  opacity: 1;
}

/* Модальное окно «Добавить в календарь» */
.calendar-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3500;
}

.calendar-modal {
  width: min(420px, 90vw);
  background: #0d1523;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 25px 25px 20px 25px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-modal h3 {
  margin: 0 0 6px 0;
  font-size: 1.2em;
  text-align: left;
  color: #ffffff !important;
}

.calendar-modal-hint {
  margin: 0 0 8px 0;
  font-size: 0.85em;
  color: var(--text-white-light, rgba(255, 255, 255, 0.8));
  line-height: 1.35;
}

.calendar-dates-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.calendar-date-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-date-row label {
  flex: 0 0 90px;
  font-size: 0.85em;
  color: var(--text-white-light, rgba(255, 255, 255, 0.8));
}

.calendar-date-row .calendar-date-input {
  flex: 1;
  min-width: 140px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff !important;
  padding: 8px 12px;
  font-family: var(--font-family, 'Unbounded', sans-serif);
  box-sizing: border-box;
}

.calendar-date-row .calendar-date-input:focus {
  outline: 2px solid rgba(52, 152, 219, 0.5);
  outline-offset: 2px;
}

.calendar-date-row-remove {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(231, 76, 60, 0.2);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.calendar-date-row-remove:hover {
  background: rgba(231, 76, 60, 0.4);
}

.btn-add-calendar-date {
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white, rgba(255, 255, 255, 0.9));
  font-size: 0.9em;
  font-family: var(--font-family, 'Unbounded', sans-serif);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-add-calendar-date:hover {
  background: rgba(52, 152, 219, 0.25);
  border-color: rgba(52, 152, 219, 0.6);
}

.calendar-modal .period-modal-actions {
  margin-top: 6px;
}