
.a-select {
    position: relative;
    display: inline-block;
    max-width: 100%;
    min-width: 0;
}

.a-select > .a-select-nativo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.a-select-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem 0.6rem 1rem;
    font: inherit;
    text-align: left;
    color: var(--ink);
    background: #fffffe;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(60, 45, 20, 0.06);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.a-select-btn::after {
    content: "";
    flex: none;
    width: 0.55rem;
    height: 0.55rem;
    margin-top: -0.2rem;
    border-right: 2px solid var(--ink-soft);
    border-bottom: 2px solid var(--ink-soft);
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.15s ease;
}

.a-select-btn:hover {
    border-color: #cfc6b6;
    background: #fff;
}

.a-select-btn:focus-visible,
.a-select.abierta .a-select-btn {
    outline: none;
    border-color: #8a7d6a;
    box-shadow: 0 0 0 3px rgba(138, 125, 106, 0.16);
}

.a-select.abierta .a-select-btn::after {
    transform: rotate(-135deg);
    margin-top: 0.2rem;
    border-color: #8a7d6a;
}

.a-select-texto {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a-select-texto.vacio {
    color: var(--ink-soft);
}

.a-select-lista {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: min(22rem, 90vw);
    max-height: 264px;
    overflow-y: auto;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: #fffffe;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(47, 90, 86, 0.2), 0 2px 6px rgba(60, 45, 20, 0.08);
    z-index: 60;
    outline: none;
}

.a-select.hacia-arriba .a-select-lista {
    top: auto;
    bottom: calc(100% + 6px);
}

.a-select-lista li {
    position: relative;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.35;
    color: var(--ink);
    cursor: pointer;
}

.a-select-lista li.resaltada {
    background: #f5f2eb;
}

.a-select-lista li.seleccionada {
    color: var(--lake-dark);
    font-weight: 600;
}

.a-select-lista li.seleccionada::after {
    content: "";
    position: absolute;
    right: 0.8rem;
    top: 50%;
    width: 0.32rem;
    height: 0.62rem;
    border-right: 2px solid var(--lake);
    border-bottom: 2px solid var(--lake);
    transform: translateY(-65%) rotate(45deg);
}

.a-select-lista li[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Selector de hora (shared/hora.js): botón de .a-select + panel con tres ruedas. */
.a-hora { display: block; position: relative; }

/* El campo de hora nativo: sin su icono, el reloj propio abre el panel de ruedas. */
.a-hora > input[type="time"] {
    width: 100%;
    padding-right: 2.6rem;
    font-variant-numeric: tabular-nums;
    color-scheme: light;
    accent-color: var(--lake);
}

.a-hora > input[type="time"]::-webkit-calendar-picker-indicator { display: none; }

.a-hora-flecha {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.6rem;
    height: 100%;
    background: none;
    border: 0;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.a-hora-flecha::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6257' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    transition: opacity 0.15s ease;
}

.a-hora-flecha:hover::after,
.a-hora.abierta .a-hora-flecha::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f726d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E");
}

.a-hora-flecha:focus-visible { outline: 2px solid rgba(63, 114, 109, 0.45); outline-offset: -4px; border-radius: 8px; }

.a-hora-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 16rem;
    max-width: calc(100vw - 2rem);
    padding: 0.6rem 0.75rem 0.7rem;
    background: #fffffe;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(47, 90, 86, 0.2), 0 2px 6px rgba(60, 45, 20, 0.08);
    z-index: 60;
}

.a-hora-panel[hidden] { display: none; }

.a-hora-ruedas {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.25rem;
}

/* Franja que marca el valor elegido, detrás de las tres ruedas. */
.a-hora-banda {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2.4rem;
    transform: translateY(-50%);
    background: #e6f0ee;
    border-radius: 10px;
    pointer-events: none;
}

.a-hora-rueda {
    position: relative;
    height: 12rem;
    padding: 4.8rem 0;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    outline: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32%, #000 68%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 32%, #000 68%, transparent);
}

.a-hora-rueda::-webkit-scrollbar { display: none; }

.a-hora-item {
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
    transition: color 0.12s ease;
}

.a-hora-item.elegida {
    color: var(--lake-dark, #2f5a56);
    font-weight: 700;
}

.a-hora-rueda:focus-visible { box-shadow: inset 0 0 0 2px rgba(63, 114, 109, 0.35); border-radius: 10px; }

.a-hora-pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
}

.a-hora-quitar,
.a-hora-listo {
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    border: 0;
    border-radius: 8px;
}

.a-hora-quitar { padding: 0.35rem 0.2rem; color: var(--ink-soft); background: none; }
.a-hora-quitar:hover { color: var(--error, #a32d2d); }
.a-hora-quitar[hidden] { display: none; }

.a-hora-listo {
    margin-left: auto;
    padding: 0.4rem 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--lake);
}

.a-hora-listo:hover { background: var(--lake-dark, #2f5a56); }
