@use '../../styles/tools'
@use './variables' as *

@include tools.layer('components')
  .v-calendar-month__day
    position: relative
    display: flex
    flex-direction: column
    // https://github.com/vuetifyjs/vuetify/issues/9058
    // https://bugzilla.mozilla.org/show_bug.cgi?id=1114904
    min-width: 0
    min-height: $calendar-weekly-day-min-height
    // Themed
    border-right: $calendar-line-width solid $calendar-line-color
    border-bottom: $calendar-line-width solid $calendar-line-color
    flex: 1 1 auto
    border-inline-end: $calendar-line-width solid $calendar-line-color

  .v-calendar-weekly__day
    flex: 1
    width: 0
    overflow: hidden
    user-select: none
    position: relative
    padding: $calendar-weekly-day-padding
    // https://github.com/vuetifyjs/vuetify/issues/9058
    // https://bugzilla.mozilla.org/show_bug.cgi?id=1114904
    min-width: 0
    min-height: $calendar-weekly-day-min-height
    // Themed
    border-right: $calendar-line-width solid $calendar-line-color
    border-bottom: $calendar-line-width solid $calendar-line-color
    flex: 1 1 auto
    border-inline-end: $calendar-line-width solid $calendar-line-color
    text-align: center

    &.v-present
      .v-calendar-weekly__day-month
        color: currentColor

  .v-calendar-weekly__day-label
    text-decoration: none
    user-select: none
    cursor: pointer
    box-shadow: none
    text-align: center

    .v-btn
      font-size: $calendar-weekly-day-label-font-size
      text-transform: none !important

      &.v-calendar-weekly__day-label__today
        background: rgba(var(--v-theme-surface-variant), var(--v-medium-emphasis-opacity))
        color: rgb(var(--v-theme-on-surface-variant))

  .v-calendar-weekly__day-month
    position: absolute
    text-decoration: none
    user-select: none
    box-shadow: none
    top: 0
    left: $calendar-weekly-day-month-left
    height: $calendar-weekly-day-label-size
    line-height: $calendar-weekly-day-label-size

  .v-calendar-weekly__day-alldayevents-container
    min-height: 24px
