/* Checkout — Pedido para regalo (discreto, tras pago) */

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgb(4 29 64 / 0.12);
    
    input {
        margin-bottom: 8px;
    }
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__checkbox {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #041d40;
    flex-shrink: 0;
    cursor: pointer;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__toggle-label {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #041d40;
    font-weight: 500;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__panel {
    margin-top: 0.85rem;
    padding-left: 1.6rem;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__form,
body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__summary {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__intro {
    font-size: 0.8125rem;
    color: rgb(4 29 64 / 0.75);
    margin: 0 0 0.5rem;
    padding: 0;
    line-height: 1.45;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__field {
    display: flex;
    flex-direction: column;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__counter {
    align-self: flex-end;
    font-size: 0.6875rem;
    color: rgb(4 29 64 / 0.5);
    margin-top: 0.2rem;
}

/* Selector de sobre regalo */
body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobres {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobres-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    /* Todas las tarjetas con la altura de la más alta de la fila */
    align-items: stretch;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre {
    position: relative;
    margin: 0;
    padding: 0;
    border: 1px solid rgb(4 29 64 / 0.15);
    transition: border-color 0.15s ease;
    display: flex;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre:hover {
    border-color: rgb(4 29 64 / 0.45);
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre:has(input:checked) {
    border-color: #041d40;
    box-shadow: inset 0 0 0 1px #041d40;
}

/* Solo al navegar con teclado */
body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre:has(input:focus-visible) {
    outline: 1px dashed #041d40;
    outline-offset: 2px;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    width: 100%;
    padding: 0.6rem;
    cursor: pointer;
    text-align: center;
    margin: 0;
}

/* El radio se oculta visualmente (sigue siendo accesible por teclado/lector), la selección se marca con el borde */
body.hyva_checkout-index-index #hyva-checkout-main input.elg-gift-wrap__sobre-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    opacity: 0;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre-image {
    width: 100%;
    height: 90px;
    object-fit: contain;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre-name {
    font-size: 0.75rem;
    color: rgb(4 29 64 / 0.75);
    line-height: 1.3;
}

/* El precio siempre abajo, aunque el nombre ocupe más o menos líneas */
body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre-price {
    margin-top: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: #041d40;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgb(4 29 64 / 0.28);
    border-radius: 0;
    padding: 0.45rem 0;
    font-size: 0.875rem;
    color: #041d40;
    background: transparent;
    box-shadow: none;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__input:focus {
    outline: none;
    border-bottom-color: #041d40;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__textarea {
    resize: vertical;
    min-height: 4.5rem;
    line-height: 1.45;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__message {
    font-size: 0.875rem;
    color: #041d40;
    margin: 0;
    line-height: 1.45;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__hint {
    font-size: 0.75rem;
    color: rgb(4 29 64 / 0.55);
    margin: 0;
}

/* Sobre regalo automático: aviso en lugar de la lista de sobres */
body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre-auto {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre-auto-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #041d40;
    margin: 0;
    line-height: 1.4;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sobre-auto-note {
    font-size: 0.75rem;
    color: rgb(4 29 64 / 0.55);
    margin: 0;
    line-height: 1.5;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__sep {
    color: rgb(4 29 64 / 0.35);
    font-size: 0.75rem;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__link {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #041d40;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
    line-height: 1.4;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__link--primary {
    font-weight: 600;
    text-decoration-thickness: 1.5px;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__link--muted {
    opacity: 0.55;
    text-decoration: none;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__link--muted:hover {
    opacity: 0.85;
    text-decoration: underline;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__link:hover {
    opacity: 0.7;
}

body.hyva_checkout-index-index #hyva-checkout-main .elg-gift-wrap__links-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

