/* Armenian date calendar. The browser popup follows the browser language. */
.hy-date {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

.hy-date.is-block {
  display: block;
  width: 100%;
}

.hy-date-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.hy-date-face {
  width: 11.5rem;
  max-width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--color-border, var(--cs-border, #dce3e8));
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.65rem center !important;
  background-size: 18px 18px !important;
  color: var(--color-text, var(--cs-text, #17233c));
  padding: 0.45rem 2.2rem 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.hy-date.is-block .hy-date-face {
  width: 100%;
}

.hy-date-face:focus-visible {
  outline: none;
  border-color: var(--brand, var(--color-primary));
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(241, 5, 5, 0.2));
}

.hy-date-pop {
  position: fixed;
  z-index: 200;
  width: min(15.5rem, calc(100vw - 16px));
  margin: 0;
  padding: 4px;
  background: #fff;
  color: var(--color-text, #17233c);
  border: 1px solid var(--color-border, #dce3e8);
  border-radius: 8px;
  font-family: inherit;
}

.hy-date-head {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hy-date-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.hy-date-nav,
.hy-date-foot button,
.hy-date-day {
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.hy-date-nav {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text, #17233c);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.hy-date-nav:hover,
.hy-date-nav:focus-visible,
.hy-date-day:not(:disabled):hover,
.hy-date-foot button:hover,
.hy-date-foot button:focus-visible {
  background: var(--brand-soft, rgba(241, 5, 5, 0.08));
}

.hy-date-week,
.hy-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.hy-date-week span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-secondary, #667085);
  letter-spacing: 0;
  text-transform: none;
}

.hy-date-day {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.hy-date-day.is-today:not(.is-selected) {
  outline: 1px solid var(--brand, var(--color-primary, #e30613));
  outline-offset: -1px;
}

.hy-date-day.is-selected,
.hy-date-day.is-selected:hover {
  background: var(--brand, var(--color-primary, #e30613));
  color: #fff;
}

.hy-date-day:disabled {
  color: #98a2b3;
  cursor: default;
  background: transparent;
}

.hy-date-foot {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.hy-date-foot button {
  flex: 1;
  min-height: 28px;
  border: 1px solid var(--color-border, #dce3e8);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.hy-date-foot button:disabled {
  color: #98a2b3;
  cursor: default;
}

@media (max-width: 1023px) {
  .hy-date-pop { width: min(18.5rem, calc(100vw - 16px)); }
  .hy-date-nav { width: 44px; height: 44px; }
  .hy-date-day,
  .hy-date-foot button { min-height: 44px; }
}
