.tsgdp-actions-template{display:none!important}

.tsgdp-actionbar{
    width:100%;
    margin:10px 0 16px;
    position:relative;
    z-index:20;
}

.tsgdp-actionbar-scroll{
    display:flex;
    align-items:center;
    gap:9px;
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    flex-wrap:nowrap;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    padding:2px 1px 4px;
}
.tsgdp-actionbar-scroll::-webkit-scrollbar{display:none}

.tsgdp-action{
    appearance:none;
    -webkit-appearance:none;
    border:1px solid #3d3d3d;
    background:#151515;
    color:#fff;
    min-height:40px;
    padding:8px 13px;
    border-radius:7px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    font-size:14px;
    font-weight:600;
    line-height:1;
    white-space:nowrap;
    cursor:pointer;
    transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
    flex:0 0 auto;
}
.tsgdp-action:hover,
.tsgdp-action:focus-visible{
    background:#e50914;
    border-color:#e50914;
    color:#fff;
    outline:none;
}
.tsgdp-action:active{transform:translateY(1px)}
.tsgdp-action.is-active{
    background:#e50914;
    border-color:#e50914;
    color:#fff;
    box-shadow:0 0 0 1px rgba(229,9,20,.15);
}
.tsgdp-action-similar{
    margin-left:auto;
    background:#222;
    border-color:#444;
}

.tsgdp-action svg{
    width:17px;
    height:17px;
    display:block;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
    flex:0 0 auto;
}
.tsgdp-action[data-tsgdp-action="favorite"] svg path,
.tsgdp-action[data-tsgdp-action="similar"] svg path{fill:currentColor;stroke:currentColor}

.tsgdp-toast{
    position:fixed;
    left:50%;
    bottom:26px;
    transform:translateX(-50%) translateY(10px);
    background:#151515;
    color:#fff;
    border:1px solid #3d3d3d;
    border-left:3px solid #e50914;
    border-radius:7px;
    padding:10px 14px;
    z-index:999999;
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease,transform .18s ease;
    font-size:14px;
    box-shadow:0 8px 30px rgba(0,0,0,.4);
}
.tsgdp-toast.is-visible{opacity:1;transform:translateX(-50%) translateY(0)}

.tsgdp-modal{
    position:fixed;
    inset:0;
    z-index:999998;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
}
.tsgdp-modal.is-open{display:flex}
.tsgdp-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.78)}
.tsgdp-modal-dialog{
    position:relative;
    width:min(540px,100%);
    max-height:86vh;
    overflow:auto;
    background:#111;
    color:#fff;
    border:1px solid #333;
    border-radius:10px;
    padding:22px;
    box-shadow:0 20px 70px rgba(0,0,0,.65);
}
.tsgdp-modal-close{
    position:absolute;
    top:8px;
    right:10px;
    width:34px;
    height:34px;
    border:0;
    background:transparent;
    color:#aaa;
    font-size:27px;
    line-height:1;
    cursor:pointer;
}
.tsgdp-modal-close:hover{color:#fff}
.tsgdp-modal h3{margin:0 38px 18px 0;color:#fff;font-size:20px}
.tsgdp-modal p{color:#ccc}
.tsgdp-report-options{display:grid;gap:9px;margin:10px 0 14px}
.tsgdp-report-option{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 11px;
    border:1px solid #333;
    border-radius:7px;
    cursor:pointer;
}
.tsgdp-report-option:hover{border-color:#e50914}
.tsgdp-report-details{
    width:100%;
    min-height:90px;
    resize:vertical;
    background:#0b0b0b;
    color:#fff;
    border:1px solid #333;
    border-radius:7px;
    padding:10px;
    box-sizing:border-box;
}
.tsgdp-primary{
    margin-top:12px;
    border:1px solid #e50914;
    background:#e50914;
    color:#fff;
    border-radius:7px;
    padding:10px 15px;
    font-weight:700;
    cursor:pointer;
}
.tsgdp-primary:hover{filter:brightness(1.08)}
.tsgdp-info-list{margin:0;padding:0;list-style:none;display:grid;gap:2px}
.tsgdp-info-list li{display:grid;grid-template-columns:130px 1fr;gap:14px;padding:10px 0;border-bottom:1px solid #262626}
.tsgdp-info-list li:last-child{border-bottom:0}
.tsgdp-info-list strong{color:#fff}
.tsgdp-info-list span{color:#cfcfcf}

.tsgdp-saved-page{width:100%;padding:10px 0}
.tsgdp-saved-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.tsgdp-saved-card{background:#111;border:1px solid #292929;border-radius:8px;overflow:hidden;color:#fff}
.tsgdp-saved-card a{color:inherit;text-decoration:none}
.tsgdp-saved-thumb{aspect-ratio:16/9;background:#222;overflow:hidden}
.tsgdp-saved-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tsgdp-saved-title{padding:10px 11px 5px;font-weight:700;line-height:1.25}
.tsgdp-saved-remove{margin:0 11px 11px;border:1px solid #3b3b3b;background:#181818;color:#ddd;padding:7px 9px;border-radius:6px;cursor:pointer}
.tsgdp-saved-remove:hover{border-color:#e50914;color:#fff}
.tsgdp-saved-empty{color:#aaa;padding:20px 0}

@media (max-width:900px){
    .tsgdp-saved-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:600px){
    .tsgdp-actionbar{margin:8px 0 13px}
    .tsgdp-actionbar-scroll{gap:7px;padding-right:8px}
    .tsgdp-action{
        width:42px;
        height:40px;
        min-height:40px;
        padding:0;
        border-radius:7px;
    }
    .tsgdp-action span{display:none}
    .tsgdp-action svg{width:18px;height:18px}
    .tsgdp-action-similar{margin-left:0}
    .tsgdp-modal{padding:12px}
    .tsgdp-modal-dialog{padding:18px 16px}
    .tsgdp-info-list li{grid-template-columns:105px 1fr;gap:9px}
    .tsgdp-saved-grid{grid-template-columns:1fr}
}

/* ===== ACCESOS GUARDADOS EN CABECERA ===== */
.tsgdp-header-saved-template{display:none!important}

.tsgdp-header-saved{
    display:flex;
    align-items:center;
    gap:7px;
    flex:0 0 auto;
    z-index:80;
}

.tsgdp-header-saved--inline{
    margin-right:9px;
}

.tsgdp-header-anchor{
    position:relative!important;
}

.tsgdp-header-saved--floating{
    position:absolute;
    right:54px;
    top:50%;
    transform:translateY(-50%);
}

.tsgdp-header-saved-link{
    position:relative;
    width:38px;
    height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 38px;
    box-sizing:border-box;
    border:1px solid #3a3a3a;
    border-radius:7px;
    background:#191919;
    color:#fff!important;
    text-decoration:none!important;
    transition:background .18s ease,border-color .18s ease,transform .18s ease;
}

.tsgdp-header-saved-link:hover,
.tsgdp-header-saved-link:focus-visible{
    background:#252525;
    border-color:#e50914;
    color:#fff!important;
    outline:none;
}

.tsgdp-header-saved-link:active{transform:translateY(1px)}

.tsgdp-header-saved-link svg{
    width:18px;
    height:18px;
    display:block;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.tsgdp-header-saved-link[data-tsgdp-header-list="favorites"] svg path{
    fill:currentColor;
    stroke:currentColor;
}

.tsgdp-header-count{
    position:absolute;
    top:-7px;
    right:-7px;
    min-width:18px;
    height:18px;
    padding:0 4px;
    box-sizing:border-box;
    border-radius:999px;
    background:#e50914;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    line-height:18px;
    font-weight:800;
    box-shadow:0 0 0 2px #1a1a1a;
    pointer-events:none;
}

.tsgdp-header-count.is-empty{display:none}

@media (max-width:600px){
    .tsgdp-header-saved{gap:5px}
    .tsgdp-header-saved--inline{margin-right:6px}
    .tsgdp-header-saved--floating{right:48px}
    .tsgdp-header-saved-link{
        width:34px;
        height:34px;
        flex-basis:34px;
        border-radius:6px;
    }
    .tsgdp-header-saved-link svg{width:17px;height:17px}
    .tsgdp-header-count{
        top:-6px;
        right:-6px;
        min-width:17px;
        height:17px;
        line-height:17px;
        font-size:9px;
    }
}

/* ===== v1.1.2: lupa a la izquierda + guardados a la derecha ===== */
.tsgdp-header-host{
    overflow:visible!important;
}
.tsgdp-header-host:not(.fixed){position:relative!important}
/* Respect the theme's fixed mode and its placeholder when scrolling. */
.tsgdp-header-host.fixed{
    position:fixed!important;
    top:var(--tsgdp-adminbar-offset,0px)!important;
    left:0;
    right:0;
    width:100%;
}

/* Mueve el componente completo de búsqueda, no solo la lupa. Así el campo
   desplegable conserva su alineación y se abre hacia la izquierda sin pisar
   Favoritos / Ver luego. */
.tsgdp-search-shifted{
    translate:calc(-1 * var(--tsgdp-search-shift, 90px)) 0!important;
}

.tsgdp-header-saved--anchored{
    position:absolute!important;
    right:auto!important;
    margin:0!important;
    transform:translateY(-50%)!important;
    z-index:90;
}

@media (max-width:600px){
    .tsgdp-header-saved--anchored{
        transform:translateY(-50%)!important;
    }
}

/* Mobile theme corrections: logo, one-line trends and redundant share links. */
.tsgdp-trends-wrapper{display:contents}
@media (max-width:600px){
    .tsgdp-mobile-brand{
        min-width:0!important;
        width:min(240px,var(--tsgdp-logo-space,calc(100vw - 148px)))!important;
        max-width:var(--tsgdp-logo-space,calc(100vw - 148px))!important;
        flex:0 1 auto!important;
    }
    .tsgdp-mobile-logo-image{
        display:block!important;
        width:100%!important;
        max-width:100%!important;
        height:auto!important;
        object-fit:contain;
    }
    .tsgdp-mobile-trends{
        display:flex!important;
        align-items:center;
        justify-content:flex-start!important;
        flex-wrap:nowrap!important;
        gap:8px;
        width:100%;
        max-width:100%;
        min-width:0;
        box-sizing:border-box;
        overflow-x:auto!important;
        overflow-y:hidden;
        white-space:nowrap;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:thin;
        padding-bottom:6px;
    }
    .tsgdp-mobile-trend-link,.tsgdp-mobile-trend-item{flex:0 0 auto!important;white-space:nowrap!important}
    .tsgdp-mobile-trends:focus-visible{outline:2px solid #e50914;outline-offset:3px}
    .tsgdp-mobile-share-link,.tsgdp-mobile-share-row{display:none!important}
}

/* ilivexvip: use the theme's real mobile breakpoint and menu structure. */
@media(max-width:1023px){
    .tsgdp-header-host .tsgdp-theme-header-row{
        display:grid!important;
        grid-template-columns:minmax(0,1fr) 40px 73px;
        align-items:center;
        gap:6px!important;
        box-sizing:border-box;
        min-width:0;
    }
    .tsgdp-header-host .tsgdp-theme-brand{
        grid-column:1;
        margin:0!important;
        min-width:0!important;
        width:100%!important;
        max-width:240px!important;
        justify-self:start;
    }
    .tsgdp-header-host .tsgdp-theme-brand > a{
        display:block!important;
        width:100%!important;
        max-width:100%!important;
    }
    .tsgdp-header-host .tsgdp-theme-brand > a > img{
        width:100%!important;
        max-width:100%!important;
        height:auto!important;
    }
    .tsgdp-header-host .tsgdp-theme-menu-open{
        grid-column:2;
        width:40px!important;
        min-width:40px!important;
        height:40px;
        margin:0!important;
        translate:none!important;
    }
    .tsgdp-header-host .tsgdp-theme-header-row > .tsgdp-header-saved{
        grid-column:3;
        position:static!important;
        left:auto!important;
        right:auto!important;
        top:auto!important;
        transform:none!important;
        margin:0!important;
        gap:5px;
        width:73px;
        z-index:auto;
    }
    .tsgdp-theme-header-row .tsgdp-header-saved-link{width:34px;height:34px;flex-basis:34px}
    .tsgdp-header-host .tsgdp-theme-menu-panel{
        z-index:10000!important;
        top:var(--tsgdp-adminbar-offset,0px)!important;
        height:calc(100vh - var(--tsgdp-adminbar-offset,0px))!important;
        height:calc(100dvh - var(--tsgdp-adminbar-offset,0px))!important;
    }
    .tsgdp-theme-menu-panel .tsgdp-theme-menu-close{color:#fff!important;position:relative;flex:0 0 40px}
    html.mn_on .tsgdp-theme-header-row > .tsgdp-header-saved{visibility:hidden!important;pointer-events:none!important}
}
@media(max-width:767px){
    .tendencias-home .tendencias-links{
        display:flex!important;
        flex-wrap:nowrap!important;
        justify-content:flex-start!important;
        max-width:100%;
        min-width:0;
        overflow-x:auto!important;
        overflow-y:hidden;
        white-space:nowrap;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:thin;
        padding-bottom:6px;
    }
    .tendencias-home .tendencias-links > a{flex:0 0 auto!important;white-space:nowrap!important}
    body.single-post .site article > footer ul.share{display:none!important}
}
.prnlst .thumb figure > img.tsgdp-card-image {
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
}
