/* Skooly Ferramentas Frontend - CSS Completo v2.1 */

/* ========== CONTAINER PRINCIPAL ========== */
.skooly-ferramentas-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #202124;
    line-height: 1.6;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.skooly-ferramentas-container * {
    box-sizing: border-box;
}

/* ========== CABEÇALHO ========== */
.skooly-header {
    background: linear-gradient(135deg, #1F6DB8 0%, #2a7bc4 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(31, 109, 184, 0.25);
}

.skooly-header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.skooly-header p {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

/* ========== BOTÕES DE NAVEGAÇÃO ========== */
.skooly-nav-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.skooly-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 14px 12px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eaed;
    transition: all 0.3s ease;
    gap: 6px;
}

.skooly-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31, 109, 184, 0.15);
    border-color: #1F6DB8;
}

.skooly-nav-btn-icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f4;
    border-radius: 50%;
    margin-bottom: 2px;
}

.skooly-nav-btn:hover .skooly-nav-btn-icon {
    background: #e8f0fe;
}

.skooly-nav-btn-title {
    font-size: 15px;
    font-weight: 600;
    color: #1F6DB8;
}

.skooly-nav-btn-subtitle {
    font-size: 12px;
    color: #5f6368;
}

/* ========== FAVORITOS E HISTÓRICO ========== */
.skooly-favorites-section,
.skooly-history-section {
    display: none;
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.skooly-favorites-section.show,
.skooly-history-section.show {
    display: block;
}

.skooly-favorites-title,
.skooly-history-title {
    font-size: 18px;
    font-weight: 600;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
}

.skooly-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.skooly-favorite-item {
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8eaed;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.skooly-favorite-item:hover {
    background: #e8f0fe;
    border-color: #1F6DB8;
}

.skooly-history-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.skooly-history-item {
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 20px;
    border: 1px solid #e8eaed;
    white-space: nowrap;
    font-size: 13px;
    color: #5f6368;
    text-decoration: none;
    transition: all 0.2s;
}

.skooly-history-item:hover {
    background: #e8f0fe;
    color: #1F6DB8;
    border-color: #1F6DB8;
}

/* ========== CONTROLES ========== */
.skooly-controls-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ========== FILTROS ========== */
.skooly-filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.skooly-filter-btn {
    padding: 10px 20px;
    border: 2px solid #e8eaed;
    border-radius: 25px;
    background: white;
    color: #5f6368;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.skooly-filter-btn:hover {
    border-color: #1F6DB8;
    color: #1F6DB8;
}

.skooly-filter-btn.active {
    background: #1F6DB8;
    color: white;
    border-color: #1F6DB8;
}

.skooly-filter-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* ========== BUSCADOR - CORRIGIDO TOTAL ========== */
.skooly-search-wrapper {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.skooly-search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.skooly-search-box input {
    width: 100%;
    padding: 14px 50px;
    border: 2px solid #e8eaed;
    border-radius: 30px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.skooly-search-box input:focus {
    border-color: #1F6DB8;
    box-shadow: 0 2px 8px rgba(31, 109, 184, 0.2);
}

/* ÍCONE DE BUSCA - CORREÇÃO TOTAL COM !IMPORTANT */
.skooly-search-icon {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 18px !important;
    color: #5f6368 !important;
    pointer-events: none !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* EMOJI DA LUPA - FORÇA TOTAL COM MÚLTIPLOS SELETORES */
.skooly-search-icon img.emoji,
.skooly-search-icon img[role="img"],
.skooly-search-icon img[draggable="false"],
.skooly-search-box .skooly-search-icon img,
.skooly-search-box span img {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: baseline !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    position: static !important;
    transform: none !important;
    float: none !important;
    line-height: 1 !important;
}

.skooly-clear-search {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: #dadce0;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
    line-height: 1;
}

.skooly-clear-search:hover {
    background: #1F6DB8;
    color: white;
}

.skooly-clear-search.show {
    display: flex;
}

/* ========== SUGESTÕES DE BUSCA ========== */
.skooly-search-suggestions {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.skooly-search-suggestions.show {
    display: flex;
}

.skooly-suggestion-tag {
    padding: 6px 14px;
    background: #f8f9fa;
    border-radius: 16px;
    font-size: 13px;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e8eaed;
}

.skooly-suggestion-tag:hover {
    background: #1F6DB8;
    color: white;
    border-color: #1F6DB8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(31, 109, 184, 0.2);
}

/* ========== CONTROLES EXTRAS ========== */
.skooly-extra-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.skooly-sort-dropdown {
    padding: 10px 16px;
    border: 2px solid #e8eaed;
    border-radius: 8px;
    background: white;
    color: #5f6368;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.skooly-sort-dropdown:hover,
.skooly-sort-dropdown:focus {
    border-color: #1F6DB8;
}

.skooly-view-toggle {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: #f1f3f4;
    border-radius: 8px;
}

.skooly-view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
    color: #5f6368;
}

.skooly-view-btn:hover {
    color: #1F6DB8;
}

.skooly-view-btn.active {
    background: white;
    color: #1F6DB8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.skooly-search-count {
    color: #5f6368;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.skooly-search-count strong {
    color: #1F6DB8;
    font-size: 18px;
}

.skooly-keyboard-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #80868b;
}

.skooly-kbd {
    padding: 2px 6px;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
}

/* ========== GRID DE FERRAMENTAS ========== */
.skooly-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    transition: all 0.3s;
}

.skooly-tools-grid.list-view {
    grid-template-columns: 1fr;
}

.skooly-tools-grid.compact-view {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ========== CARD DE FERRAMENTA ========== */
.skooly-tool-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eaed;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0;
    animation: skoolyFadeInUp 0.4s ease forwards;
}

.skooly-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(31, 109, 184, 0.15);
    border-color: #1F6DB8;
}

/* Barra colorida no topo */
.skooly-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-color, #1F6DB8);
    transition: height 0.3s ease;
    z-index: 0;
}

.skooly-tool-card:hover::before {
    height: 5px;
}

/* ========== CONTEÚDO DO CARD ========== */
.skooly-card-content {
    padding: 24px;
    padding-top: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.skooly-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.skooly-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    margin-right: 40px;
}

/* ========== BADGES ========== */
.skooly-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}

.skooly-badge-category {
    background: #e8f0fe;
    color: #1a73e8;
}

.skooly-badge-bncc {
    background: #e6f4ea;
    color: #1e8e3e;
}

.skooly-badge-new {
    background: #fef7e0;
    color: #ea8600;
    animation: skoolyPulse 2s ease-in-out infinite;
}

.skooly-badge-inclusao {
    background: #f3e8fd;
    color: #9334e6;
}

@keyframes skoolyPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ========== BOTÃO FAVORITAR - CORRIGIDO ========== */
.skooly-favorite-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
    color: #5f6368;
    line-height: 1;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.skooly-favorite-btn:hover {
    transform: scale(1.2);
    color: #fbbc04;
    background: rgba(251, 188, 4, 0.1);
}

.skooly-favorite-btn.active {
    color: #fbbc04;
    filter: drop-shadow(0 2px 4px rgba(251, 188, 4, 0.3));
}

/* ========== TÍTULO E DESCRIÇÃO ========== */
.skooly-card-title {
    color: #202124;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.2s ease;
    padding-right: 10px;
}

.skooly-tool-card:hover .skooly-card-title {
    color: #1F6DB8;
}

.skooly-card-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1e8e3e;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.skooly-status-dot {
    width: 7px;
    height: 7px;
    background: #1e8e3e;
    border-radius: 50%;
    animation: skoolyStatusPulse 2s ease-in-out infinite;
}

@keyframes skoolyStatusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.skooly-card-locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #d63638;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.skooly-card-description {
    color: #5f6368;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.skooly-card-title mark,
.skooly-card-description mark {
    background: #fff59d;
    padding: 2px 4px;
    border-radius: 3px;
}

/* ========== FOOTER DO CARD ========== */
.skooly-card-footer {
    padding: 16px 24px;
    background: transparent;
    border-top: 1px solid #e8eaed;
}

.skooly-card-link {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: #1F6DB8;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.skooly-card-link:hover {
    background: #f1f3f4;
}

.skooly-card-link-upgrade {
    background: #1F6DB8;
    color: white;
}

.skooly-card-link-upgrade:hover {
    background: #1557a0;
}

/* ========== FERRAMENTA BLOQUEADA ========== */
.skooly-tool-locked {
    opacity: 0.7;
}

.skooly-tool-locked .skooly-card-title {
    color: #5f6368;
}

.skooly-tool-locked:hover {
    opacity: 1;
}

/* ========== SEM RESULTADOS ========== */
.skooly-no-results {
    display: none;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.skooly-no-results.show {
    display: block;
}

.skooly-no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.skooly-no-results h3 {
    color: #5f6368;
    font-size: 20px;
    margin-bottom: 10px;
}

.skooly-no-results p {
    color: #80868b;
    font-size: 14px;
}

/* ========== FOOTER ========== */
.skooly-footer {
    text-align: center;
    padding: 30px 20px;
    color: #5f6368;
    font-size: 14px;
}

.skooly-footer strong {
    color: #1F6DB8;
}

/* ========== ANIMAÇÕES ========== */
@keyframes skoolyFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVIDADE ========== */
@media screen and (max-width: 768px) {
    .skooly-ferramentas-container {
        padding: 20px 15px;
    }
    
    .skooly-header {
        padding: 30px 20px;
        margin-bottom: 16px;
    }
    
    .skooly-header h1 {
        font-size: 24px;
    }
    
    .skooly-header p {
        font-size: 14px;
    }
    
    .skooly-nav-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .skooly-tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .skooly-search-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .skooly-search-box {
        max-width: 100%;
    }
    
    .skooly-filter-buttons {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }
    
    .skooly-extra-controls {
        width: 100%;
    }
    
    .skooly-sort-dropdown {
        flex: 1;
    }
}

/* ========== SELEÇÃO DE TEXTO ========== */
.skooly-ferramentas-container ::selection {
    background: #1F6DB8;
    color: white;
}

.skooly-ferramentas-container ::-moz-selection {
    background: #1F6DB8;
    color: white;
}

/* ========== SEÇÕES SEPARADAS ========== */
.skooly-section-available,
.skooly-section-locked {
    margin-bottom: 30px;
}

.skooly-section-header {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #1F6DB8;
}

.skooly-section-locked .skooly-section-header {
    border-left-color: #ea8600;
    background: linear-gradient(135deg, #fff 0%, #fffbf0 100%);
}

.skooly-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #202124;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skooly-section-subtitle {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
}

.skooly-section-count {
    background: #e8f0fe;
    color: #1F6DB8;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

.skooly-section-locked .skooly-section-count {
    background: #fef7e0;
    color: #ea8600;
}

.skooly-section-available .skooly-tools-grid {
    margin-bottom: 0;
}

.skooly-upgrade-cta {
    text-align: center;
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.skooly-upgrade-cta strong {
    color: #ea8600;
}

/* ========== CORREÇÃO EXTRA PARA ÍCONE DE BUSCA ========== */
/* Força máxima para sobrescrever estilos do WordPress */

/* Container do ícone */
.skooly-ferramentas-container .skooly-search-box .skooly-search-icon,
.skooly-controls-section .skooly-search-box .skooly-search-icon,
.skooly-search-wrapper .skooly-search-box .skooly-search-icon {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 5 !important;
    pointer-events: none !important;
}

/* Imagem do emoji - múltiplos seletores para máxima especificidade */
.skooly-ferramentas-container .skooly-search-box .skooly-search-icon img,
.skooly-ferramentas-container .skooly-search-box span img,
.skooly-controls-section .skooly-search-box .skooly-search-icon img,
.skooly-search-wrapper .skooly-search-box .skooly-search-icon img,
.skooly-search-box .skooly-search-icon img[draggable],
.skooly-search-box span[class*="icon"] img,
.skooly-search-box span img.emoji,
.skooly-search-box span img[role="img"],
img.emoji[alt="🔍"],
img[alt="🔍"][role="img"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    vertical-align: baseline !important;
    position: static !important;
    transform: none !important;
    float: none !important;
    line-height: 1 !important;
}

/* Ajuste no input para comportar o ícone */
.skooly-ferramentas-container .skooly-search-box input[type="search"],
.skooly-controls-section .skooly-search-box input {
    padding-left: 48px !important;
}
