/**
 * Selector modal de regalos (compartido: index, videos, overlays, música).
 * Solo icono + precio; nombre oculto (accesible vía aria-label).
 */
.modal-seleccion-regalo {
    display: none;
    position: fixed;
    inset: 0;
    /* Por encima de modales de config de paneles (p. ej. gift-cfg-modal z-index 1000040) */
    z-index: 2147483000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(3, 6, 12, 0.76);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    box-sizing: border-box;
}
.modal-seleccion-regalo.show {
    display: flex;
}
.modal-seleccion-regalo-inner {
    width: min(96vw, 720px);
    height: min(92vh, 900px);
    max-height: 92vh;
    --regalo-modal-rainbow: linear-gradient(
        125deg,
        #22d3ee,
        #818cf8,
        #f472b6,
        #fbbf24,
        #4ade80,
        #22d3ee
    );
    border: 2px solid transparent;
    border-radius: 18px;
    background:
        linear-gradient(168deg, rgba(12, 20, 34, 0.98) 0%, rgba(6, 10, 16, 1) 100%) padding-box,
        var(--regalo-modal-rainbow) border-box;
    background-clip: padding-box, border-box;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 25px 50px -12px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.modal-seleccion-regalo-header {
    flex-shrink: 0;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.18);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(16, 27, 42, 0.95);
}
.modal-seleccion-regalo-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    flex: 1 1 auto;
}
.regalo-modal-filtro {
    flex: 1 1 200px;
    max-width: 360px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(10, 12, 18, 0.9);
    color: #f4f4f5;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
.regalo-modal-filtro:focus {
    border-color: #38bdf8;
}
.btn-cerrar-modal-regalo {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.btn-cerrar-modal-regalo:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
#regalo-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 14px 16px 18px;
    background: #060d16;
    -webkit-overflow-scrolling: touch;
}
#grid-regalos-modal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 10px;
    align-content: start;
    justify-items: stretch;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.modal-seleccion-regalo .regalo-modal-tile,
.regalo-modal-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 10px 8px 12px !important;
    min-height: 96px !important;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(71, 85, 105, 0.45) !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, rgba(22, 28, 40, 0.96) 0%, rgba(10, 14, 22, 0.98) 100%) !important;
    cursor: pointer;
    font-family: inherit;
    color: #f4f4f5;
    overflow: visible;
    animation: none !important;
    transform: none;
    transition: border-color 0.15s, transform 0.12s, background 0.15s !important;
}
.modal-seleccion-regalo .regalo-modal-tile:hover,
.regalo-modal-tile:hover {
    border-color: rgba(251, 191, 36, 0.45) !important;
    background: linear-gradient(180deg, rgba(30, 38, 55, 0.98) 0%, rgba(14, 18, 28, 1) 100%) !important;
    transform: translateY(-2px) !important;
    z-index: 2;
}
.regalo-modal-tile-imgwrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    flex-shrink: 0;
}
.modal-seleccion-regalo .regalo-modal-tile img,
.modal-seleccion-regalo .regalo-modal-tile img.regalo-modal-tile-img,
.regalo-modal-tile img,
.regalo-modal-tile img.regalo-modal-tile-img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 56px !important;
    max-height: 56px !important;
    object-fit: contain !important;
    flex-shrink: 0;
    animation: none !important;
    transform: none !important;
}
.modal-seleccion-regalo .regalo-modal-tile:hover img,
.regalo-modal-tile:hover img {
    animation: none !important;
    transform: none !important;
}
.regalo-modal-tile-name {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}
.regalo-modal-tile-badge {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 2px;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0;
    align-items: center;
    gap: 3px;
    padding: 2px 7px 2px 5px;
    border-radius: 999px;
    background: rgba(6, 8, 14, 0.9);
    border: 1px solid rgba(251, 191, 36, 0.52);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    font-size: 10px;
    font-weight: 800;
    color: #fcd34d;
    line-height: 1;
    pointer-events: none;
}
.regalo-modal-tile-badge-dia {
    font-size: 9px;
    color: #fbbf24;
    line-height: 1;
}
.regalo-modal-tile-badge-num {
    font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
    .modal-seleccion-regalo .regalo-modal-tile:hover,
    .regalo-modal-tile:hover {
        transform: none !important;
    }
}

/* Selectores cerrados: icono + precio (custom-dropdown) */
.custom-dropdown-btn--gift-picked {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    min-height: 52px;
    padding: 6px 8px !important;
}
.custom-dropdown-btn--gift-picked .cd-btn-img {
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    object-fit: contain !important;
}
.custom-dropdown-btn--gift-picked .cd-text {
    display: none !important;
}
.cd-gift-precio,
.custom-dropdown-btn--gift-picked .cd-gift-precio {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 800;
    color: #fcd34d;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Filas gift-pick (overlays) */
.gift-pick-btn.has-gift {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 8px 10px !important;
    text-align: center;
}
.gift-pick-btn.has-gift .gift-pick-text {
    display: none !important;
}
.gift-pick-precio {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 800;
    color: #fcd34d;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.gift-pick-precio[hidden] {
    display: none !important;
}
