.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Checkbox personalizado */
#nova-favorita:checked + div {
    background-color: #f59e0b;
}

#nova-favorita:checked + div i {
    color: white;
}

.ring-copiado {
    box-shadow: 0 0 0 4px #22c55e80; /* verde-500 com transparência */
    transition: box-shadow 0.3s;
    animation: ringFadeOut 2s forwards;
}

@keyframes ringFadeOut {
    0% { box-shadow: 0 0 0 4px #22c55e80; }
    100% { box-shadow: 0 0 0 0px #22c55e00; }
}

#alerta-container {
    z-index: 50;
    position: fixed;
    top: 0;
    right: 0;
    width: auto;
}

/* --- NOVOS ESTILOS PARA O BOTÃO DE LIMPAR PESQUISA --- */

/* Estado ativo (quando há texto na pesquisa) */
#btn-limpar-pesquisa[data-active="true"] {
    color: #ef4444; /* text-red-500 */
}

/* Hover do estado ativo */
#btn-limpar-pesquisa[data-active="true"]:hover {
    background-color: #ef4444; /* bg-red-500 */
    color: #ffffff; /* text-white */
}

/* As classes abaixo podem ser removidas pois foram substituídas por classes do Tailwind */
/* 
#btn-limpar-pesquisa.active { ... }
.materias-dia-container { ... }
.dark .materias-dia-container { ... }
.materia-action-button { ... }
*/

/* Oculta a barra de rolagem por padrão */
body {
    overflow-y: scroll;
    scrollbar-width: thin; /* Firefox: barra fina */
    scrollbar-color: transparent transparent; /* Firefox: barra invisível */
}

/* Chrome, Safari, Opera: barra invisível por padrão */
body::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

/* Mostra a barra de rolagem ao passar o mouse ou usar o scroll */
body:hover::-webkit-scrollbar,
body:active::-webkit-scrollbar,
body:focus-within::-webkit-scrollbar {
    background: #e5e7eb; /* bg-zinc-200 */
}

body:hover::-webkit-scrollbar-thumb,
body:active::-webkit-scrollbar-thumb,
body:focus-within::-webkit-scrollbar-thumb {
    background: #a1a1aa; /* bg-zinc-400 */
    border-radius: 8px;
}

/* Firefox: mostra barra ao hover */
body:hover {
    scrollbar-color: #a1a1aa #e5e7eb;
}

/* Botão de atualizar: animação de zoom e rotação */
.btn-atualizar-animando {
    transform: scale(0.95);
    transition: transform 0.2s;
}
@keyframes girar360 {
    from { transform: rotate(0deg);}
    to { transform: rotate(360deg);}
}
.btn-icone-girando {
    animation: girar360 0.5s linear;
}

.btn-atualizar {
    transition: transform 0.2s, color 0.2s;
}