/* Custom styles to complement Pico.css */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

article
 {
    margin: 0 0;
    
}

main.container {
    flex-grow: 1;
    /* Removed padding-top: 1rem; as flash messages are now at absolute top */
    /* You might want to add padding-top to your <nav> or first element inside <main> if needed */
    padding-bottom: 2rem;
    position: relative;
}

/* Flash Message Container Styling */
#flash-message-container {
    position: fixed; /* Takes the container out of the normal document flow */
    top: 0;          /* Position it at the very top of the viewport */
    left: 0;         /* Position it at the very left of the viewport */
    width: auto;     /* Let it size to its content, up to a max-width */
    max-width: 400px;/* Or a percentage like 40%. Adjust as needed for message width. */
                     /* For top-left, you might want a more defined width than 90% of viewport. */
    padding: 1rem;   /* Add some padding around the messages within the container */
    z-index: 1050;   /* Ensure it's above most other content */
    display: flex;   /* Use flexbox to arrange multiple messages if they appear simultaneously */
    flex-direction: column;
    gap: 0.75rem;    /* Space between multiple flash messages */
}

/* Individual Flash Message Article Styling */
.flash-message-article {
    padding: 0.75em 1em; /* Adjusted padding for individual messages */
    border-left-width: 0.25rem;
    border-left-style: solid;
    border-radius: var(--pico-border-radius);
    box-shadow: var(--pico-box-shadow);
    color: var(--pico-contrast-inverse);
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.4s ease-in-out; /* Added transform transition */
    transform: translateX(0); /* Initial state */
}

.success-flash {
    background-color: #1d7a29;
    border-left-color: var(--pico-color-green-700);
    color: var(--pico-color-green-50);
}

.error-flash {
    background-color: #7a1d1d;
    border-left-color: var(--pico-color-red-700);
    color: var(--pico-color-red-50);
}


/* Responsive table for dashboard */
@media (max-width: 768px) {
    #flash-message-container {
        width: 90%; /* On smaller screens, let it take more width */
        max-width: none;
        padding: 0.5rem; /* Reduce padding on small screens */
        gap: 0.5rem;
    }

    /* ... rest of your responsive table CSS ... */
    table thead {
        display: none;
    }
    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }
    table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--pico-table-border-color);
    }
    table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid var(--pico-table-border-color);
    }
    table td:last-child {
        border-bottom: none;
    }
    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        width: calc(50% - 1rem);
        padding-right: 0.5rem;
        font-weight: bold;
        text-align: left;
    }
}
.overflow-auto {
    overflow-x: auto;
}