﻿/* =========================
   VARIÁVEIS / PALETA
========================= */
:root {
    --mid-primary: #6c2bd9; /* switch roxo */
    --mf-purple: #783fa6; /* base MidFielder */

    --accent-money: #53fc18;
    --accent-money-s: rgba(83,252,24,.12);
    --accent-bits: #5865F2;
    --accent-bits-s: rgba(88,101,242,.12);
    --accent-default: var(--mf-purple);
    --accent-default-s: rgba(120,63,166,.12);
}

/* Accent dinâmico por data-attrs (não muda nomes do JS) */
.sound-container[data-type="money"] {
    --accent: var(--accent-money);
    --accent-soft: var(--accent-money-s);
}

.sound-container[data-type="bits"] {
    --accent: var(--accent-bits);
    --accent-soft: var(--accent-bits-s);
}

.sound-container:not([data-type]) {
    --accent: var(--accent-default);
    --accent-soft: var(--accent-default-s);
}

.sound-container {
    --accent: var(--accent-default);
    --accent-soft: var(--accent-default-s);
}

/* =========================
   SWITCH Bootstrap 4 / AdminLTE
========================= */
.custom-switch .custom-control-label::before {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.custom-switch .custom-control-input:checked + .custom-control-label::before {
    background-color: var(--mid-primary) !important;
    border-color: var(--mid-primary) !important;
}

.custom-switch .custom-control-label::after,
.custom-switch .custom-control-input:checked + .custom-control-label::after {
    background: #fff !important;
    background-image: none !important;
    border: 0 !important;
}

.custom-switch .custom-control-input:focus + .custom-control-label::before,
.custom-switch .custom-control-input:focus:checked + .custom-control-label::before {
    box-shadow: 0 0 0 .2rem rgba(108,43,217,.25) !important;
}

.custom-switch .custom-control-input:active + .custom-control-label::before {
    background-color: #e9ecef !important;
}

.custom-switch .custom-control-input:active:checked + .custom-control-label::before {
    background-color: var(--mid-primary) !important;
}

.custom-switch-on-success .custom-control-input:checked + .custom-control-label::before,
.custom-switch.custom-switch-on-success .custom-control-input:checked + .custom-control-label::before {
    background-color: var(--mid-primary) !important;
    border-color: var(--mid-primary) !important;
}

.custom-switch-off-danger .custom-control-label::before,
.custom-switch.custom-switch-off-danger .custom-control-label::before {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
}

/* =========================
   MODAL preview em container (se usado)
========================= */
#container-modal-visual .modal,
#container-modal-visual .modal-dialog {
    position: static !important;
    display: block !important;
    margin: 0 !important;
    max-width: none !important;
}

#container-modal-visual .modal-content {
    border: 0 !important;
    box-shadow: none !important;
}

/* =========================
   LISTA / CONTAINER
========================= */
.sounds-container {
    height: 87vh;
    padding: 18px;
    border-radius: 16px;
    overflow-y: auto;
    background-color: var(--perfil-bg, #783fa680);
    backdrop-filter: saturate(1.05);
    scrollbar-width: thin;
}

    .sounds-container::-webkit-scrollbar {
        width: 8px;
    }

    .sounds-container::-webkit-scrollbar-thumb {
        border-radius: 8px;
    }

/* Item root — mantém nomes usados pelo JS */
.sound-container {
    cursor: pointer;
    min-width: 320px;
    border-radius: 20px;
    padding: 6px;
    transition: transform .18s ease, opacity .18s ease;
}

    .sound-container:hover {
        opacity: .98;
        transform: translateY(-2px);
    }

    .sound-container:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(120,63,166,.35);
        border-radius: 22px;
    }

/* =========================
   TILE (mantém .info-box)
========================= */
.info-box.sound-tile {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    border-radius: 20px !important;
    border: 2px solid transparent;
    background: linear-gradient(#fff,#fff) padding-box, linear-gradient(135deg, var(--accent), rgba(0,0,0,0)) border-box;
    box-shadow: 0 14px 38px rgba(0,0,0,.12);
    padding: 14px;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.sound-container:hover .sound-tile {
    box-shadow: 0 18px 50px rgba(0,0,0,.16);
    transform: translateY(-1px);
}

/* Badge tipo (sem duplicar título) */
.type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: .25rem .6rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .2px;
    border-radius: 999px;
    background: rgba(120,63,166,.14);
    color: #3a2a55;
    backdrop-filter: blur(2px);
}

/* =========================
   PLAY — neutro, com anel/acento
========================= */
.sound-card {
    transition: transform .18s ease, box-shadow .18s ease;
}
/* mantém classe */
.brand-play {
    opacity: .98;
    transition: opacity .18s ease;
}
    /* mantém classe */
    .brand-play:hover {
        opacity: 1;
    }

.tile-play {
    width: 66px;
    height: 66px;
    border-radius: 999px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1f1f1f; /* ícone escuro neutro */
    border: 2px solid var(--accent); /* anel na cor do tipo */
    box-shadow: 0 2px 10px rgba(0,0,0,.08), 0 0 0 4px var(--accent-soft); /* halo suave */
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

    .tile-play:hover {
        transform: scale(1.04);
        box-shadow: 0 6px 18px rgba(0,0,0,.12), 0 0 0 6px var(--accent-soft);
        color: var(--accent); /* ícone pega acento no hover */
    }
    /* removido o ::before colorido para evitar cor “estranha” */

    /* Ícones no play */
    .tile-play .fa {
        font-size: 1.35rem;
    }

.icon-figure {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* =========================
   TÍTULO e VALOR
========================= */
.tile-main .tile-title {
    font-weight: 800;
    color: #151515;
    line-height: 1.22;
    font-size: 1.06rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.22em * 2);
    margin: 0 0 2px 0;
}

.tile-meta .value-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: .95;
}

.tile-meta .value-pill {
    display: inline-block;
    margin-left: .35rem;
    font-weight: 800;
    font-size: 1.02rem;
    line-height: 1;
    padding: .5rem .8rem;
    border-radius: 999px;
    color: #1f1f1f;
    background: linear-gradient(#fff,#fff) padding-box, linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.02)) border-box, linear-gradient(135deg, var(--accent), rgba(0,0,0,0)) border-box;
    border: 2px solid transparent;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    white-space: nowrap;
}

/* =========================
   RODAPÉ (sem bolinha)
========================= */
.tile-foot {
    border-top: 1px dashed rgba(0,0,0,.08);
    padding-top: 8px;
}

.tile-hint {
    font-size: .78rem;
    color: #5a5a5a;
}

/* =========================
   Densidade maior (opcional)
========================= */
@media (min-width:1400px) {
    .tile-main .tile-title {
        font-size: 1.1rem;
    }

    .tile-play {
        width: 70px;
        height: 70px;
    }
}

/* === Compacta o rodapé do tile === */
.tile-foot {
    border-top: 1px dashed rgba(0,0,0,.08);
    padding: 4px 0 2px; /* antes: 8px no topo */
    margin-top: 6px; /* segura um espaçozinho mínimo acima */
}

    .tile-foot .tile-hint {
        font-size: .74rem; /* menor que .78rem */
        line-height: 1; /* tira respiro vertical */
        margin: 0; /* remove margem padrão do <span> em alguns temas */
        padding: 0;
    }

/* (opcional) versão ainda mais “fina” — ative se quiser mais compacto */
/*
.tile-foot{ padding: 2px 0 0; margin-top: 4px; }
.tile-foot .tile-hint{ font-size: .72rem; }
*/
/* === Compactar a altura de cada sound-container / tile === */

/* Menos respiro no wrapper do item */
.sound-container {
    padding: 4px; /* antes: 6px */
}

/* Tile mais enxuto */
.info-box.sound-tile {
    padding: 10px; /* antes: 14px */
    gap: 8px; /* antes: 10px */
}

/* Botão Play menor e com menos margem lateral */
.tile-body .tile-play {
    width: 56px; /* antes: 66px */
    height: 56px; /* antes: 66px */
    margin-right: 10px; /* antes: 12px */
    box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 0 0 4px var(--accent-soft);
}

/* Título com fonte e altura de linha levemente menores */
.tile-main .tile-title {
    font-size: 1.02rem; /* antes: 1.06rem */
    line-height: 1.18; /* antes: 1.22 */
    min-height: calc(1.18em * 2); /* mantém 2 linhas, mas um pouco mais compactas */
    margin: 0 0 1px 0; /* antes: 0 0 2px 0 */
}

/* Linha de valor mais contida */
.tile-meta .value-icon {
    width: 22px; /* antes: 24px */
    height: 22px; /* antes: 24px */
}

.tile-meta .value-pill {
    padding: .4rem .7rem; /* antes: .5rem .8rem */
    font-size: .98rem; /* antes: 1.02rem */
}

/* Rodapé já compacto — vamos apertar só mais um pouco */
.tile-foot {
    padding: 2px 0 2px; /* antes: 4px 0 2px */
    margin-top: 4px; /* antes: 6px */
}

    .tile-foot .tile-hint {
        font-size: .72rem; /* antes: .74rem */
        line-height: 1;
        margin: 0;
        padding: 0;
    }

/* Badge de tipo com menos volume visual */
.type-badge {
    top: 8px; /* antes: 10px */
    right: 8px; /* antes: 10px */
    padding: .2rem .5rem; /* antes: .25rem .6rem */
    font-size: .68rem; /* antes: .72rem */
}

/* Em telas largas, não aumente de novo o Play */
@media (min-width: 1400px) {
    .tile-play {
        width: 60px;
        height: 60px;
    }
    /* antes: 70px */
}

/* Ultra-compact — descomente para reduzir mais */
/*
.tile-main .tile-title{
  -webkit-line-clamp: 1;        /* título em 1 linha */
min-height: 1.18em;
}

.tile-meta .value-pill {
    padding: .35rem .6rem;
    font-size: .95rem;
}

.tile-body .tile-play {
    width: 52px;
    height: 52px;
}

.info-box.sound-tile {
    padding: 8px;
    gap: 6px;
}

.tile-foot {
    padding: 0;
    margin-top: 2px;
}
 
/* === Remover borda colorida dos tiles (.sound-tile) === */
/* Fica com borda neutra; a cor permanece apenas na .value-pill */
.info-box.sound-tile {
    /* antes usava var(--accent) no segundo gradient */
    background: linear-gradient(#fff,#fff) padding-box, linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.02)) border-box !important;
}

/* === Play neutro (sem anel/halo colorido) === */
.tile-play {
    border-color: rgba(0,0,0,.14) !important; /* antes: var(--accent) */
    box-shadow: 0 2px 10px rgba(0,0,0,.08) !important; /* remove 0 0 0 4px var(--accent-soft) */
    color: #1f1f1f !important; /* ícone escuro, sem cor por tipo */
}

    .tile-play:hover {
        color: #1f1f1f !important; /* mantém neutro no hover */
        box-shadow: 0 6px 18px rgba(0,0,0,.12) !important; /* halo neutro */
        background: #fff !important; /* evita preencher com acento */
    }

/* === Mantém a cor SOMENTE na pílula de valor === */
/* (Nada a mudar aqui se você já usa .value-pill com var(--accent)) */
/* .tile-meta .value-pill { ... usa var(--accent) no seu CSS atual } */
