/*
 * Copyright Sean Proctor
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.phpc-month-view {
  font-size: 0.6rem;
}

@media (min-width: 768px) {
  .phpc-month-view {
    font-size: 0.8rem;
  }
}

col.day {
  width: 14%;
}

col.wnumber {
  width: 2%;
}

.phpc-add {
  float: right;
  padding: 0 .25rem;
  border-radius: .25rem;
}

/* Right-to-left languages */
[dir="rtl"] .phpc-add {
  float: left;
}

/* Arrows point the way the page reads */
[dir="rtl"] .phpc-flip-rtl {
  transform: scaleX(-1);
}

/* On devices that can hover, the add buttons only show for the day under the pointer or with focus */
@media (hover: hover) {
  .phpc-add {
    opacity: 0;
  }

  .phpc-date:hover .phpc-add,
  .phpc-add:focus-visible {
    opacity: 1;
  }
}

.phpc-month-view td {
  height: 8rem;
}

.phpc-month-view th {
  white-space: nowrap;
}

.phpc-day-number {
  display: inline-block;
  padding: .125rem .375rem;
  border-radius: var(--bs-border-radius);
  color: var(--bs-body-color);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease-in-out;
}

/* Like a text button: tinted on hover, since the number opens the day */
.phpc-day-number:hover {
  background-color: var(--bs-secondary-bg);
}

.phpc-day-number:active {
  background-color: var(--bs-tertiary-color);
}

.phpc-day-number.bg-primary:hover {
  background-color: rgba(var(--bs-primary-rgb), .85) !important;
}

.occurrence-list {
  margin-top: .5rem;
}

.phpc-day-time {
  min-width: 9.5rem;
}

.min-w-0 {
  min-width: 0;
}

.markdown > :last-child {
  margin-bottom: 0;
}

/* Forms and messages that read better in a column than across a wide screen */
.phpc-narrow {
  max-width: 44rem;
}

/* Inline SVG icons (ux_icon), aligned with the text like the Bootstrap Icons font */
.phpc-icon {
  vertical-align: -.125em;
}
