/* Shared professional controls for the public Current Affairs pages. */
.compact-input,
.select-wrap,
.month-search,
.sort-wrap {
  border-color: #cbd7e8;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.compact-input:hover,
.select-wrap:hover,
.month-search:hover,
.sort-wrap:hover {
  border-color: #aebfda;
  background: #fcfdff;
}

.compact-input:focus-within,
.select-wrap:focus-within,
.month-search:focus-within,
.sort-wrap:focus-within {
  border-color: #0957ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(9, 87, 255, .11);
}

.compact-input input,
.compact-input select,
.select-wrap select,
.sort-wrap select,
.month-search input {
  color: #10265a;
  font-weight: 600;
}

.compact-input select,
.select-wrap select,
.sort-wrap select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.compact-input .field-chevron,
.select-wrap > svg:last-child,
.sort-wrap > svg:last-child {
  color: #6c7d9c;
  pointer-events: none;
}

.compact-input.date-input {
  position: relative;
}

.compact-input.date-input input[type="date"] {
  color-scheme: light;
  cursor: pointer;
}

.compact-input.date-input input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0 0 0 auto;
  width: 40px;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.date-btn,
.pdf-btn,
.arrow-btn,
.selected-date,
.pick-date {
  transition: border-color .2s ease, background-color .2s ease,
    box-shadow .2s ease, color .2s ease;
}

.date-btn:not(.active):hover,
.pdf-btn:hover,
.arrow-btn:not(:disabled):hover,
.selected-date:hover {
  border-color: #0957ff;
  background: #f5f8ff;
  color: #0957ff;
}

.date-btn:focus-visible,
.pdf-btn:focus-visible,
.arrow-btn:focus-visible,
.selected-date:focus-visible,
.pick-date:focus-within {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(9, 87, 255, .11);
}

.date-picker-proxy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* Branded one-click calendar used by the Current Affairs Quiz. */
.period-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.professional-date {
  position: relative;
  width: 220px;
  max-width: 100%;
}

.professional-date-trigger {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #cbd7e8;
  border-radius: 7px;
  background: #fff;
  color: #10265a;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.professional-date-trigger > svg:first-child {
  width: 17px;
  color: #516b9a;
}

.professional-date-trigger .date-chevron {
  width: 15px;
  margin-left: auto;
  color: #6c7d9c;
  transition: transform .2s ease;
}

.professional-date-trigger:hover {
  border-color: #aebfda;
  background: #fcfdff;
}

.professional-date-trigger:focus-visible,
.professional-date-trigger[aria-expanded="true"] {
  outline: 0;
  border-color: #0957ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(9, 87, 255, .11);
}

.professional-date-trigger[aria-expanded="true"] .date-chevron {
  transform: rotate(180deg);
}

.pick.calendar-open {
  position: relative;
  z-index: 30;
}

.professional-calendar {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 500;
  width: 282px;
  max-width: calc(100vw - 48px);
  padding: 12px;
  border: 1px solid #d4deec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 36, 95, .18);
  animation: calendar-in .16s ease-out;
}

.professional-calendar[hidden] {
  display: none;
}

@keyframes calendar-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.calendar-header {
  height: 36px;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 4px;
}

.calendar-header strong {
  text-align: center;
  color: #0b1e58;
  font-size: 13px;
}

.calendar-header button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #536789;
  display: grid;
  place-items: center;
}

.calendar-header button:hover:not(:disabled) {
  background: #edf4ff;
  color: #0957ff;
}

.calendar-header button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.calendar-header svg {
  width: 17px;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-weekdays {
  margin: 7px 0 5px;
  color: #71809a;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.calendar-weekdays span {
  line-height: 24px;
}

.calendar-day {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #172954;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.calendar-day:hover:not(:disabled) {
  border-color: #bfd2f7;
  background: #edf4ff;
  color: #0755e8;
}

.calendar-day.other-month {
  color: #9aa6ba;
}

.calendar-day.today:not(.selected) {
  border-color: #9ebcf5;
  color: #0755e8;
}

.calendar-day.selected {
  border-color: #0957ff;
  background: #0957ff;
  color: #fff;
  box-shadow: 0 3px 8px rgba(9, 87, 255, .22);
}

.calendar-day:disabled {
  color: #c4cad5;
  cursor: not-allowed;
}

.calendar-footer {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #e5ebf3;
  display: flex;
  justify-content: space-between;
}

.calendar-footer button {
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0957ff;
  font-size: 11px;
  font-weight: 700;
}

.calendar-footer button:hover {
  background: #edf4ff;
}

/* Common custom dropdown used by quiz week/month and monthly filters. */
.compact-input,
.select-wrap,
.sort-wrap {
  position: relative;
}

.professional-native-select {
  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;
}

.professional-select {
  position: static;
  flex: 1;
  min-width: 0;
  height: 100%;
}

.professional-select-trigger {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #10265a;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.professional-select-trigger:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(9, 87, 255, .14);
}

.professional-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 7px);
  left: -1px;
  right: -1px;
  z-index: 600;
  max-height: 230px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #d6e0ee;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 36, 95, .16);
  animation: calendar-in .14s ease-out;
}

.professional-select.open .professional-select-menu {
  display: block;
}

.professional-select-menu button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #273858;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

.professional-select-menu button:hover:not(:disabled),
.professional-select-menu button:focus-visible {
  outline: 0;
  background: #f1f6ff;
  color: #0957ff;
}

.professional-select-menu button.selected {
  background: #eaf2ff;
  color: #0755e8;
  font-weight: 700;
}

.professional-select-menu button:disabled {
  color: #aab3c3;
  cursor: not-allowed;
}

.professional-control-open {
  z-index: 250;
  border-color: #0957ff !important;
  box-shadow: 0 0 0 3px rgba(9, 87, 255, .11);
}

.compact-input > .field-chevron,
.select-wrap > svg:last-child,
.sort-wrap > svg:last-child {
  transition: transform .2s ease;
}

.professional-control-open > .field-chevron,
.professional-control-open > svg:last-child {
  transform: rotate(180deg);
}

/* Shared custom calendar anchors for Daily Current Affairs pages. */
.professional-calendar-control {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.professional-calendar-control.calendar-control-open {
  z-index: 450;
}

.professional-calendar-control > .generated-calendar {
  top: calc(100% + 8px);
  left: 0;
}

.professional-calendar-control [data-professional-calendar] > svg:last-child {
  transition: transform .2s ease;
}

.professional-calendar-control.calendar-control-open [data-professional-calendar] > svg:last-child {
  transform: rotate(180deg);
}

.selected-date .date-chevron {
  width: 14px;
  margin-left: 2px;
  color: #6c7d9c;
}

.selected-date {
  min-width: 170px;
  font-size: 14px;
  white-space: nowrap;
}

.selected-date span {
  white-space: nowrap;
}

.pick-date {
  border: 0;
  background: transparent;
  font: inherit;
}

.calendar-footer [data-calendar-today] {
  margin-left: auto;
}

@media (max-width: 620px) {
  .compact-input,
  .select-wrap,
  .month-search,
  .sort-wrap {
    width: 100%;
  }

  .professional-date {
    width: 100%;
  }

  .professional-calendar-control {
    max-width: 100%;
  }
}
