/* Estilos personalizados */
html, body {
    height: 100%;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Classes de transição para a alternância de tema */
.bg-white, .bg-gray-100, .bg-gray-200, .bg-gray-800, .bg-gray-900,
.text-gray-100, .text-gray-200, .text-gray-300, .text-gray-700, .text-gray-800, .text-gray-900,
.border-gray-200, .border-gray-700,
nav, footer {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Adaptação de cores para os temas claro e escuro */
body.bg-gray-100 {
    background-color: #f7fafc;
    color: #2d3748;
}

body.dark\:bg-gray-900 {
    background-color: #1a202c;
    color: #e2e8f0;
}

/* Labels, Inputs e Selects */
.dark label {
    color: #e2e8f0;
}

.dark input, .dark select, .dark textarea {
    background-color: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

.dark .task-item,
.dark .bg-white {
    background-color: #2d3748;
    color: #e2e8f0;
}

/* Ajustes para o "Task Filters" */
.dark .bg-white.shadow-lg {
    background-color: #293342;
}

.dark .bg-white.shadow-lg h2,
.dark .text-gray-800 {
    color: #f7fafc;
}

.dark .text-gray-300 {
    color: #b8c0c5;
}

.dark .text-gray-600 {
    color: #bdc5ca;
}

.dark select {
    background-color: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

.dark select option {
    background-color: #2d3748;
    color: #e2e8f0;
}

/* Estilos para mensagens */
.dark .bg-{{ category }}-100 {
    background-color: #2d3748;
    color: #e2e8f0;
}

/* Adaptação do gradiente do cabeçalho */
nav {
    background-image: linear-gradient(to right, #3b82f6, #8b5cf6);
}

.dark nav {
    background-image: linear-gradient(to right, #1e40af, #5b21b6);
}

/* Adaptação da cor do footer no tema escuro */
.dark footer {
    background-color: #1a202c;
    color: #e2e8f0;
}

/* Animações */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out;
}

/* Ajustes gerais */
html.dark body {
    background-color: #1a202c;
    color: #e2e8f0;
}

html:not(.dark) body {
    background-color: #f7fafc;
    color: #2d3748;
}

/* Estilos personalizados */
.task-item {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left-color: #3b82f6;
}

.dark .task-item:hover {
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}

/* Design responsivo */
@media (max-width: 640px) {
    .add-button-responsive {
        flex-direction: column;
    }

    .add-button-responsive a {
        margin-top: 1rem;
    }

    .task-item .flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .task-item .space-x-2 {
        margin-top: 1rem;
    }

    .task-info-container {
        display: flex;
        flex-direction: column;
        margin-top: 1rem; /* Adiciona espaçamento acima */
    }
    
    .task-item .due-date { /* Remove espaçamento que pode ser adicionado pelas classes */
        margin-bottom: 0;
    }

    /* Esconde os spans no container de informações */
    .task-item .task-info-container {
        display: none;
    }
    
    .task-item .priority-category-container {
        display: none;
    }

    /* Mostra os spans no container de informações */
    .task-item .task-info-container {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
    }
}

@media (min-width: 641px) {
    /* Esconde os spans no container de informações */
    .task-item .task-info-container {
        display: none;
    }
    
    .task-item .priority-category-container {
        display: flex;
        flex-direction: row;
    }
}

/* Tasks Filters */
@media (min-width: 330px) {
    .filters-form-responsive .filters-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}


/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Efeitos futuristas */
.button, .toggle-task, .delete-task, a[href^="/task/"] {
    position: relative;
    overflow: hidden;
}

.button::after, .toggle-task::after, .delete-task::after, a[href^="/task/"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(25, 25);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.button:focus:not(:active)::after,
.toggle-task:focus:not(:active)::after,
.delete-task:focus:not(:active)::after,
a[href^="/task/"]:focus:not(:active)::after,
a[href^="/login/"]:focus:not(:active)::after,
a[href^="/register/"]:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}