/* Original subscription/card/calendar rules from Wallos cc9677a, GPL-3.0. */
.subscriptions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
  font-size: 17px;
}

.subscription-container {
  position: relative;
  background-color: var(--box-background-color);
  box-shadow: var(--box-shadow);
  border-radius: 16px;
}

.subscription {
  display: flex;
  flex-direction: column;
  height: auto;
  justify-content: flex-start;
  gap: 12px;
  background-color: var(--box-background-color);
  border: 1px solid var(--box-border-color);
  box-shadow: var(--box-shadow);
  padding: 12px 15px;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
  justify-content: center;
}

.subscription:hover {
  border-color: rgba(var(--main-color-rgb), 0.35);
}

.subscription-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  position: relative;
  min-height: 40px;
}

.subscription-main > span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  margin: 0px;
}

.subscription .name {
  flex-basis: 25%;
  font-weight: 600;
}

.subscription .cycle {
  flex-basis: 16%;
  flex-grow: 1;
  flex-direction: row;
  align-items: center;
}

.subscription .cycle > svg {
  width: 15px;
  height: 15px;
  margin-right: 3px;
  margin-top: 2px;
}

.subscription .next {
  flex-basis: 16%;
  flex-grow: 1;
  text-transform: capitalize;
}

.subscription .price {
  flex-basis: 8%;
  justify-content: center;
  flex-direction: row;
}

.subscription .price .original_price {
  font-size: 14px;
  color: var(--text-muted);
}

.calendar-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.calendar-title h2 {
  margin-right: 0px;
}

.calendar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.calendar-nav .button {
  height: auto;
  padding: 8px 11px;
  font-size: 14px;
}

.calendar-nav .button:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.calendar {
  width: 100%;
  background-color: var(--box-background-color);
  border: 1px solid var(--box-border-color);
  border-radius: 16px;
  box-shadow: var(--box-shadow);
  box-sizing: border-box;
  overflow: hidden;
}

.calendar .calendar-header,
.calendar .calendar-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar .calendar-header .calendar-cell {
  padding: 14px 0px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.calendar .calendar-body .calendar-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 96px;
  padding: 8px;
  box-sizing: border-box;
  border-top: 1px solid var(--box-border-color);
  overflow: hidden;
}

.calendar .calendar-body .calendar-cell + .calendar-cell {
  border-inline-start: 1px solid var(--box-border-color);
}

.calendar .calendar-body .calendar-cell.empty {
  background-color: rgba(var(--text-muted-rgb), 0.04);
}

.calendar .day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  flex-shrink: 0;
}

.calendar .today .day {
  background-color: var(--main-color);
  color: #fff;
  font-weight: 700;
}

.calendar .calendar-cell-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.calendar .calendar-event {
  background-color: rgba(var(--main-color-rgb), 0.1);
  color: var(--main-color);
  font-size: 12px;
  font-weight: 500;
  text-align: start;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.15s ease-in-out;
}

.calendar .calendar-event:hover {
  background-color: rgba(var(--main-color-rgb), 0.18);
}

@media (max-width: 768px) {
  .calendar .calendar-header .calendar-cell {
    padding: 10px 0px 8px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .calendar .calendar-body .calendar-cell {
    min-height: 72px;
    padding: 4px;
    gap: 4px;
  }

  .calendar .day {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .calendar .calendar-event {
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 5px;
  }
}
