.vpc-calendar {
  background: #f9f9f9;
  border: 1px solid #d5d9de;
  border-radius: 8px;
  padding: 16px;
  color: #18324a;
  font-family: Arial, sans-serif;
}

.vpc-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.vpc-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vpc-title {
  margin: 0;
  color: #12344f;
  font-size: 2rem;
}

.vpc-nav {
  background-color: #811826;
  border: none;
  color: #ffffff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  line-height: 1;
  padding: 14px 8px 16px 10px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 300ms ease-in-out;
}

.vpc-nav:hover,
.vpc-nav:focus {
  color: #ffffff;
  border: 0;
  opacity: 1;
}

.vpc-view-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.vpc-view-tab {
  border: 1px solid #12344f;
  background: #fff;
  color: #12344f;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
}

.vpc-view-tab.is-active {
  background: #12344f;
  color: #fff;
}

.vpc-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.vpc-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vpc-week {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  --vpc-week-rows: 1;
}

.vpc-week-events {
  position: absolute;
  left: 0;
  right: 0;
  top: 28px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px 6px;
  grid-auto-rows: 22px;
  pointer-events: none;
  z-index: 2;
}

.vpc-weekday {
  font-weight: 600;
  text-align: center;
  padding: 6px 0;
  color: #355a77;
  font-size: 1.5rem;
}

.vpc-day {
  background: #fff;
  border: 1px solid #e4e7eb;
  border-radius: 6px;
  min-height: calc(40px + var(--vpc-week-rows, 1) * 24px);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.vpc-day--outside {
  opacity: 0.45;
}

.vpc-day-number {
  font-size: 0.8rem;
  font-weight: 600;
}

.vpc-event {
  border-radius: 4px;
  padding: 4px 6px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  display: block;
}

.vpc-event--span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: auto;
  padding: 3px 6px;
}

.vpc-tooltip {
  position: fixed;
  z-index: 99999;
  max-width: 320px;
  background: #fff;
  border: 1px solid #ccd4dc;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  padding: 10px;
  color: #0f2940;
  font-size: 1rem;
  min-height: 200px;
}

.vpc-tooltip-close {
  position: fixed;
  top: 10px;
  right: 20px;
  border: none;
  background: transparent;
  color: #12344f;
  font-size: 42px !important;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.vpc-tooltip-close:active,
.vpc-tooltip-close:hover,
.vpc-tooltip-close:focus {
  position: fixed;
}

.vpc-tooltip h4 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #0f2940;
}

.vpc-tooltip img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  margin-bottom: 8px;
}

.vpc-tooltip p {
  margin: 0 0 6px;
  font-size: 1rem;
}

.vpc-tooltip a {
  font-size: 1rem;
  color: #174f7a;
  text-decoration: underline;
}

.vpc-tooltip strong {
  font-weight: 700;
}

.vpc-calendar.vpc-day-view .vpc-weekdays {
  display: none;
}

.vpc-calendar.vpc-day-view .vpc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.vpc-calendar.vpc-day-view .vpc-day {
  min-height: 220px;
}

.vpc-calendar.vpc-day-view .vpc-day-number {
  font-size: 1rem;
}

.vpc-calendar.vpc-day-view .vpc-event {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.vpc-tooltip--mobile-fullscreen {
  left: 8px !important;
  top: 8px !important;
  width: calc(100vw - 16px) !important;
  height: calc(100dvh - 16px) !important;
  max-width: none;
  max-height: none;
  border-radius: 0;
  border: none;
  padding: 18px;
  overflow-y: auto;
  box-sizing: border-box;
}

.vpc-tooltip--mobile-fullscreen p {
  font-size: 18px;
}

.vpc-tooltip--mobile-fullscreen a {
  font-size: 18px;
}

.vpc-tooltip--mobile-fullscreen h4 {
  font-size: 24px;
}

.vpc-tooltip:not(.vpc-tooltip--mobile-fullscreen) .vpc-tooltip-close {
  display: none;
}

@media (max-width: 991px) {
  .vpc-calendar {
    padding: 4px;
  }
  
  .vpc-day-number {
    display: none;
  }

  .vpc-day {
    min-height: calc(30px + var(--vpc-week-rows, 1) * 20px);
  }

  .vpc-event {
    font-size: 10px;
    padding: 2px;
    line-height: 1.0;
  }

  .vpc-week-events {
    gap: 1px;
    grid-auto-rows: 18px;
  }
}
