/* Свои списки, календарь и время вместо системных окон (GLA-364) — к js/gc-controls.js.
   Цвета — как у полей сайта: тёмный фон, серые линии, белый выбранный пункт; без акцентов. */

.gc-select {
    position: relative;
    display: block;
}

/* Прозрачная кнопка поверх <select>: сам список виден под ней и показывает выбор. */
.gc-select-hit {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.gc-select-hit:disabled {
    cursor: not-allowed;
}

.gc-select-hit:focus {
    outline: none;
}

/* Фокус на кнопке рисуем рамкой самого поля — как было у <select>:focus. */
.gc-select.gc-focus select {
    border-color: #fff;
}

.gc-select-hit:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.gc-native-hidden {
    position: absolute !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
}

.gc-proxy {
    cursor: pointer;
    caret-color: transparent;
}

/* ---- окно ---- */

.gc-pop {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    background: #161616;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    color: #fff;
    font-family: inherit;
    text-align: left;
}

.gc-pop.gc-pop-up {
    top: auto;
    bottom: calc(100% + 6px);
}

.gc-list {
    max-height: min(280px, 50vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
}

.gc-list-option {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px 10px 36px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.3;
    cursor: pointer;
    position: relative;
    overflow-wrap: anywhere;
}

.gc-list-option.gc-active {
    background: rgba(255, 255, 255, 0.08);
}

.gc-list-option[aria-selected="true"] {
    font-weight: 600;
}

/* Галочка у выбранного — контуром, как иконки подвала. */
.gc-list-option[aria-selected="true"]::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 5px;
    height: 10px;
    margin-top: -7px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.gc-list-option[aria-disabled="true"] {
    color: #6a6a6a;
    cursor: not-allowed;
}

.gc-list-group {
    padding: 10px 12px 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a8a8a;
}

/* ---- календарь ---- */

.gc-cal {
    padding: 12px;
    max-width: 340px;
    right: auto;
    width: 100%;
    min-width: 280px;
}

.gc-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.gc-cal-title {
    font-weight: 700;
    font-size: 16px;
}

.gc-cal-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.gc-cal-nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gc-cal-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
}

.gc-cal-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.gc-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.gc-cal-wd span {
    padding: 4px 0 6px;
    text-align: center;
    font-size: 12px;
    color: #8a8a8a;
}

.gc-cal-day {
    height: 40px;
    min-width: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
}

.gc-cal-day:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
}

.gc-cal-day.gc-today {
    border-color: #4a4a4a;
}

.gc-cal-day.gc-chosen {
    background: #fff;
    color: #000;
    font-weight: 700;
}

.gc-cal-day:disabled {
    color: #4a4a4a;
    cursor: default;
}

.gc-cal-day:focus-visible,
.gc-cal-nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 1px;
}

@media (max-width: 380px) {
    .gc-cal {
        min-width: 0;
        padding: 8px;
    }
    .gc-cal-day {
        height: 38px;
        font-size: 14px;
    }
}
