/**
 * Estilos específicos do Hub de Ferramentas
 * Micro-animações, badges e estilos de cards
 * 
 * NOTA: Este arquivo é carregado apenas no hub e nas landings, não globalmente
 * 
 * IMPORTANTE: Convertido de @apply para CSS padrão para compatibilidade com Tailwind CDN
 */

/* ========================================
   CARDS DE FERRAMENTA
   ======================================== */

.tool-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    position: relative;
}

.tool-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.tool-card:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tool-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    margin-right: 1rem;
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
}

.tool-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.tool-card-description {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5rem;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.badge-free {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-eta {
    background-color: #eff6ff;
    color: #1e40af;
}

.badge-hot {
    background-color: #fed7aa;
    color: #9a3412;
}

.badge-category {
    background-color: #f3f4f6;
    color: #4b5563;
}

.badge-popular {
    background-color: #f3e8ff;
    color: #6b21a8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

/* ========================================
   ETA PILL (Tempo Estimado)
   ======================================== */

.eta-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: #6b7280;
}

.eta-pill svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

/* ========================================
   WIZARD/RECOMENDADOR
   ======================================== */

/* Remove outline azul da section do wizard */
.wizard-section {
    outline: none !important;
    overflow: visible;
}

.wizard-section:focus,
.wizard-section:focus-within {
    outline: none !important;
}

.wizard-container {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    border: none;
    outline: none !important;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

.wizard-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.wizard-step {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background-color: white;
    border: 2px solid #d1d5db;
    color: #374151;
}

.wizard-step:hover {
    border-color: #3b82f6;
    color: #1e40af;
}

.wizard-step.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.wizard-step.active:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.wizard-progress {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.wizard-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.wizard-option {
    padding: 1rem;
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
    min-width: 0;
}

.wizard-option:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wizard-option.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.wizard-results {
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeIn 0.3s ease-in forwards;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   BARRA DE BUSCA
   ======================================== */

.tool-search-bar {
    margin-bottom: 2rem;
}

.tool-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tool-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.tool-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.tool-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: #6b7280;
    background-color: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-search-clear:hover {
    color: #374151;
    background-color: #f3f4f6;
}

.tool-search-count {
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
}

.tool-search-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-search-chip {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    background-color: white;
    border: 2px solid #d1d5db;
    color: #374151;
}

.tool-search-chip:hover {
    border-color: #3b82f6;
    color: #1e40af;
}

.tool-search-chip.chip-active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.tool-search-chip.chip-active:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.tool-search-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.tool-search-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    color: #3b82f6;
    border-color: #d1d5db;
    border-radius: 0.25rem;
}

.tool-search-toggle input[type="checkbox"]:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Highlight de resultados */
.tool-mark {
    background: #fde68a;
    color: inherit;
    padding: 0 2px;
    border-radius: 4px;
    font-weight: 500;
}

/* Estado vazio */
.tool-search-empty {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #f9fafb;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    display: none;
}

.tool-search-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.tool-search-empty-text {
    color: #4b5563;
    margin-bottom: 1rem;
}

.tool-search-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-search-suggestion-chip {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    background-color: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.tool-search-suggestion-chip:hover {
    border-color: #3b82f6;
    color: #1e40af;
    background-color: #eff6ff;
}

.tool-search-empty-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #22c55e;
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s;
    margin-top: 1rem;
    text-decoration: none;
}

.tool-search-empty-cta:hover {
    background-color: #16a34a;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 640px) {
    .tool-card-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .tool-card-title {
        font-size: 1rem;
    }
    
    .tool-card-description {
        font-size: 0.75rem;
        min-height: 2rem;
    }
    
    .tool-search-wrapper {
        flex-direction: column;
    }
    
    .tool-search-clear {
        align-self: flex-end;
    }
    
    .tool-search-chips {
        justify-content: center;
    }
}
