:root {
    --header-height: 56px;
}

body {
    padding-top: var(--header-height);
    background: linear-gradient(to right, #FFC15F, #FFC15F, #E8930C, #B26E04);
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.alert-container {
    position: fixed;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alert {
    min-width: 200px;
}

.main-app {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    width: 100%;
    padding: 2rem;
    margin-bottom: 5rem;
}

.card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 12px; /* Increase the radius for more rounded corners */
    overflow: hidden; /* Ensure child elements do not overflow */
    border: 1px solid rgba(0, 0, 0, 0.17); /* Optional: add a subtle border */
}

.card-body {
    flex: 1;
    justify-content: space-between;
    border-top-left-radius: inherit; /* Match body corners to card */
    border-top-right-radius: inherit;
}

.card-footer {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    border-bottom-left-radius: inherit; /* Match footer corners to card */
    border-bottom-right-radius: inherit;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-input {
    height: 2.5rem;
    width: 100%;
    max-width: 25rem;
    margin-right: 0.5rem;
}

#sort-select {
    width: 100%;
    max-width: 10rem;
}

.labels-card .badge {
    flex-shrink: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-input,
.form-select {
    height: 2.5rem;
    border-radius: 0.5rem;
    margin-right: 0.5rem;
}

.form-select {
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-select:focus,
.search-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Responsive Layout for Search and Sort */
@media (max-width: 768px) {
    .d-flex.align-items-center {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input,
    #sort-select {
        width: 100%;
        max-width: none;
        margin-bottom: 0.5rem;
    }

    .form-select,
    .search-input {
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    .main-app {
        padding: 1rem;
    }

    .card-body {
        height: auto;
    }
}


/* Skeleton styles */
.skeleton {
    background-color: #e0e0e0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #e0e0e0 0%, #f5f5f5 50%, #e0e0e0 100%);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.skeleton-title {
    width: 70%;
    height: 24px;
    margin-bottom: 16px;
}

.skeleton-text {
    width: 100%;
    height: 16px;
}

.skeleton-badge {
    width: 50px;
    height: 24px;
}
