/* ============================
   Estilos compartilhados para os componentes 
   mobileSidebarLetra e mobileSidebarCifra
   ============================ */

/* Sidebar customizado - fullscreen bottom */
.ui-sidebar-bottom {
    height: 100vh !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    border-radius: 0 !important;
}

.mobile-sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #1C1D22;
    color: #FFDB84;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    min-height: 50px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.mobile-sidebar-close {
    background: transparent;
    border: none;
    color: #FFDB84;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

.mobile-sidebar-body {
    flex: 1;
    overflow-y: hidden;
    padding: 0;
    padding-bottom: 100px;
    width: 100%;
    position: relative;
}

/* Sobrescrita para sidebar da cifra e letra */
body .ui-sidebar {
    background: #fff;
    color: #495057;
    padding: 0;
    border: 0 none;
    box-shadow: none;
}

/* Fonte controls */
.mobile-font-controls {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.mobile-font-btn {
    background: rgba(255, 219, 132, 0.1);
    border: 1px solid #FFDB84;
    color: #FFDB84;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-font-btn:hover {
    background: rgba(255, 219, 132, 0.2);
    transform: scale(1.05);
}

/* Letra */
.mobile-letra-content {
    font-family: monospace;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #333;
    padding: 16px;
    transition: font-size 0.2s ease;
}

#letraContent {
    padding-top: 15px;
}

/* Cifra */
.mobile-cifra-content {
    font-family: monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    white-space: pre-wrap;
    color: #333;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 9px;
    padding-bottom: 80px;
    background: white;
    border-radius: 8px;
    height: calc(100vh - 120px);
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Tom Selector Mobile */
.mobile-tom-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    margin: 16px 16px 12px 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.mobile-tom-selector-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.mobile-tom-label {
    font-weight: 600;
    color: #1C1D22;
    font-size: 14px;
    white-space: nowrap;
}

/* Grid de Tons */
.mobile-tons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.mobile-ton-item {
    padding: 12px;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-ton-item:active {
    transform: scale(0.95);
}

.mobile-ton-item.selected {
    background: #1C1D22;
    color: #FFDB84;
    border-color: #FFDB84;
}

/* Botão Buscar Cifra/Letra */
.mobile-search-cifra-btn {
    width: 100%;
    padding: 16px;
    background: #1C1D22;
    color: #FFDB84;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Estilos para acordes nas cifras */
.cifra_cnt b,
.mobile-cifra-content b {
    color: #f70 !important;
    font-weight: bold !important;
}

.mobile-cifra-content p {
    margin-bottom: -6px;
    margin-top: 7px;
}

.mobile-cifra-content p:nth-child(1) {
    display: none;
}

/* Controles de Scroll - Minimalista */
.mobile-scroll-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(28, 29, 34, 0.9);
    border-radius: 24px;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    min-width: 220px;
    max-width: 80%;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
}

.mobile-scroll-controls.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    pointer-events: none;
}

.mobile-scroll-slider-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.mobile-scroll-btn-control {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FFDB84;
    color: #1C1D22;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.mobile-scroll-btn-control:active {
    transform: scale(0.9);
}

.mobile-scroll-btn-reset {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 219, 132, 0.25);
    color: #FFDB84;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.mobile-scroll-btn-reset:active {
    transform: scale(0.9);
}

/* Botão Flutuante para Scroll */
.mobile-scroll-toggle {
    position: fixed;
    bottom: 20px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: transparent;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 999;
}

.mobile-scroll-toggle:active {
    transform: scale(0.9);
}

.mobile-scroll-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    background: #e0e0e0 !important;
    border: none !important;
    height: 6px !important;
    border-radius: 3px !important;
}

/* Slider handle - PrimeFaces slider */
.ui-sidebar .ui-slider .ui-slider-handle {
    background: #1C1D22 !important;
    border: 2px solid #FFDB84 !important;
    width: 18px !important;
    height: 18px !important;
    top: -6px !important;
    border-radius: 50% !important;
}

.ui-sidebar .ui-slider .ui-slider-range {
    background: #1C1D22 !important;
}

/* Slider jQuery UI dentro dos controles de scroll */
.mobile-scroll-slider-container .ui-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 3px;
    margin: 0 4px;
    position: relative;
}

.mobile-scroll-slider-container .ui-slider .ui-slider-handle {
    background: #FFDB84 !important;
    border: 2px solid #1C1D22 !important;
    width: 18px !important;
    height: 18px !important;
    top: -7px !important;
    border-radius: 50% !important;
    cursor: pointer;
    outline: none;
}

.mobile-scroll-slider-container .ui-slider .ui-slider-range {
    background: #FFDB84 !important;
    border-radius: 3px;
}

/* Media queries para mobile */
@media (max-width: 768px) {
    .mobile-tom-selector {
        margin: -4px 6px 0px -4px;
        padding: 12px 12px;
        gap: 8px;
    }

    .mobile-tom-selector-left {
        gap: 8px;
    }

    .mobile-tom-label {
        font-size: 16px;
    }
}

/* Ocultar elementos indesejados do CifraClub */
.section-expand--input {
    display: none;
}
.toneFuseAdButton {
    display: none !important;
}
#cifra_tom {
    display: none !important;
}
#t402-prompt-iframe {
    display: none;
}
#pub-cc-bandsintown--song_above_ad {
    display: none;
}
#js-blackfriday-card-container {
    display: none;
}
h1.section-title {
    display: none;
}
