.calendar-controls {
  background: #ffffff;
  border: 1px solid #9aa9bd;
  padding: 8px 16px;
  border-radius: 0;
  margin-bottom: 12px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-month-label {
  font-size: 1.25rem;
  font-weight: 600;
  color: #00326b;
  margin: 0;
}

.calendar-btn {
  min-height: 36px;
  min-width: 110px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #9aa9bd;
  border-radius: 4px;
  color: #1f2a3a;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-btn:hover {
  background: #d6dde8;
  border-color: #00326b;
  color: #00326b;
}

.calendar-section {
  background: #ffffff;
  border: 1px solid #9aa9bd;
  border-radius: 0;
  overflow: hidden;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 2px solid #f2b400;
  font-family: var(--form-font-family) !important;
  background: #e7effa;
}

.calendar-header-row {
  background: transparent;
}

.calendar-header {
  padding: 12px;
  text-align: center;
  font-weight: 700;
  color: #ffffff;
  border: 1px solid #00326b;
  font-size: 26pt;
}

.calendar-header-row .calendar-header:nth-child(1) {
  background: #ff9aa1;
}

.calendar-header-row .calendar-header:nth-child(2) {
  background: #f6c27d;
}

.calendar-header-row .calendar-header:nth-child(3) {
  background: #a9dce1;
}

.calendar-header-row .calendar-header:nth-child(4) {
  background: #3f6f8a;
}

.calendar-header-row .calendar-header:nth-child(5) {
  background: #ff8f95;
}

.calendar-header-row .calendar-header:nth-child(6) {
  background: #f6c27d;
}

.calendar-header-row .calendar-header:nth-child(7) {
  background: #a6d6db;
}

.calendar-header {
  border: 1px solid #00326b;
  color: #0a2f5f;
  font-family: var(--form-font-family);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}

.calendar-header-row .calendar-header:nth-child(1) {
  background: #ff9aa1;
  color: #0a2f5f;
}

.calendar-header-row .calendar-header:nth-child(2) {
  background: #f6c27d;
  color: #0a2f5f;
}

.calendar-header-row .calendar-header:nth-child(3) {
  background: #a9dce1;
  color: #0a2f5f;
}

.calendar-header-row .calendar-header:nth-child(4) {
  background: #3f6f8a;
  color: #fdfbf6;
}

.calendar-header-row .calendar-header:nth-child(5) {
  background: #ff8f95;
  color: #0a2f5f;
}

.calendar-header-row .calendar-header:nth-child(6) {
  background: #f6c27d;
  color: #0a2f5f;
}

.calendar-header-row .calendar-header:nth-child(7) {
  background: #a6d6db;
  color: #0a2f5f;
}

.calendar-body {
  background: #ffffff;
}

.calendar-cell {
  height: 140px;
  border: 1px solid #9aa9bd;
  padding: 8px;
  vertical-align: top;
  background: #ffffff;
  font-size: 18pt;
}

.calendar-cell.calendar-other-month {
  background: #d6dde8;
  color: #9aa9bd;
}

.calendar-day-number {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2a3a;
  margin-bottom: 4px;
}

.calendar-cell.calendar-other-month .calendar-day-number {
  color: #9aa9bd;
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
}

.calendar-event {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 2px solid;
  line-height: 1.3;
  word-wrap: break-word;
  white-space: normal;
  display: inline-block;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1024px) {
  .calendar-cell {
    height: 120px;
  }

  .calendar-event {
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .calendar-nav {
    flex-direction: column;
    gap: 12px;
  }

  .calendar-month-label {
    font-size: 1.2rem;
  }

  .calendar-cell {
    height: 100px;
    padding: 6px;
  }

  .calendar-header {
    padding: 8px;
    font-size: 0.9rem;
  }

  .calendar-day-number {
    font-size: 0.8rem;
  }

  .calendar-event {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .calendar-controls {
    padding: 12px;
  }

  .calendar-nav {
    gap: 8px;
  }

  .calendar-month-label {
    font-size: 1rem;
  }

  .calendar-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .calendar-cell {
    height: 80px;
    padding: 4px;
  }

  .calendar-header {
    padding: 6px;
    font-size: 0.8rem;
  }

  .calendar-day-number {
    font-size: 0.7rem;
  }

  .calendar-event {
    font-size: 0.6rem;
    padding: 1px 2px;
  }
}

.calendar-header,
.calendar-day-number,
.calendar-event {
  font-size: 10pt;
}

.calendar-event-text {
  display: inline-block;
  line-height: 1.1;
  text-align: center;
}

.calendar-event-text.calendar-event-small {
  font-size: 8pt;
}
