/* Reusable single-month picker module.
   Usage: add data-date-mode="month" to an input; static/date-picker.js handles initialization. */

.custom-date-popover:has(.custom-month-picker-shell) {
  width: min(340px, calc(100vw - 1.5rem));
  max-width: min(340px, calc(100vw - 1.5rem));
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 20px 48px rgba(15, 52, 77, .16);
}

.custom-month-picker-shell {
  width: 100%;
  box-sizing: border-box;
  padding: .82rem;
}

.custom-month-picker-single {
  display: block;
}

.custom-month-picker-main {
  min-width: 0;
}

.custom-month-main-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: .58rem;
}

.custom-month-main-title {
  color: #14384d;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.35;
}

.custom-month-picker-shell .custom-date-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: .48rem;
  margin-bottom: .62rem;
}

.custom-month-picker-shell .custom-date-title-row {
  justify-content: center;
}

.custom-month-picker-shell .custom-date-nav {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: #f3f8fb;
  color: #14384d;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.custom-month-picker-shell .custom-date-nav:hover {
  background: #e2f2f8;
  color: #075b88;
  transform: translateY(-1px);
}

.custom-month-picker-shell .custom-date-select {
  min-width: 112px;
  height: 36px;
  padding: 0 2rem 0 1rem;
  border: 1px solid rgba(11, 92, 142, .14);
  border-radius: 13px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.4 1.4L6 6l4.6-4.6' fill='none' stroke='%2314384d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right .82rem center !important;
  background-size: .72rem auto !important;
  color: #14384d;
  font-size: .9rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 7px 18px rgba(15, 52, 77, .05);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.custom-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .46rem;
}

.custom-month-cell {
  min-height: 38px;
  border: 0;
  border-radius: 13px;
  background: #f2f8fb;
  color: #244659;
  font-size: .9rem;
  font-weight: 800;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.custom-month-cell:hover {
  background: #e4f4fa;
  color: #075b88;
  transform: translateY(-1px);
}

.custom-month-cell.is-active {
  background: linear-gradient(135deg, #075b88 0%, #1194c3 100%);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 12px 22px rgba(7, 91, 136, .22);
}

@media (max-width: 575.98px) {
  .custom-month-picker-shell {
    padding: .72rem;
  }

  .custom-month-picker-shell .custom-date-head {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: .42rem;
  }

  .custom-month-picker-shell .custom-date-nav,
  .custom-month-picker-shell .custom-date-select {
    height: 34px;
  }

  .custom-month-cell {
    min-height: 36px;
    border-radius: 12px;
  }
}
