/* Hide sidebar on larger screens */
@media (min-width: 768px) {
    .app-sidebar {
        display: none;
    }
}

/* Styles for mobile and tablet screens (<= 768px) */
@media (max-width: 768px) {

    /* Sidebar */
    .app-sidebar {
        position: fixed;
        bottom: 0;
        /* Stick to bottom */
        left: 0;
        width: 100%;
        background: #fff;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 10px 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .app-sidebar {
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .app-sidebar-link {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: #f5f5f5;
        border: none;
    }

    .app-sidebar-link i {
        font-size: 24px;
        color: black;
    }

    /* Project box layout */
    .project-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .project-box-image {
        width: 120px;
        margin: 0 auto;
    }

    .project-box-image a {
        display: flex;
        justify-content: center;
    }

    .project-box-details {
        width: 100%;
    }

    .project-box-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .project-box-actions form,
    .project-box-actions button {
        width: 100%;
    }

    /* Hide footer on mobile */
    .footer {
        display: none;
    }
}

/* ========================================
       Animation: Shake effect for error messages
       ======================================== */
@keyframes shake {
    0% {
        transform: translate(-50%, 0);
    }

    20% {
        transform: translate(-50%, -5px);
    }

    40% {
        transform: translate(-50%, 5px);
    }

    60% {
        transform: translate(-50%, -5px);
    }

    80% {
        transform: translate(-50%, 5px);
    }

    100% {
        transform: translate(-50%, 0);
    }
}

/* ========================================
       Error Message Box (hidden by default)
       ======================================== */
.error-messages {
    display: none;
    /* Hidden initially */
    position: fixed;
    /* Always stays in the same position */
    top: 20%;
    /* 20% from the top of the viewport */
    left: 50%;
    /* Center horizontally */
    transform: translate(-50%, 0);
    /* Perfect centering */
    background-color: #f8d7da;
    /* Light red background for error */
    color: #721c24;
    /* Dark red text for better readability */
    padding: 20px;
    /* Space inside the box */
    border-radius: 10px;
    /* Rounded corners */
    border: 1px solid #f5c6cb;
    /* Border matching background tone */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Subtle shadow effect */
    z-index: 9999;
    /* Always stays on top of other elements */
}

/* ========================================
       Show Error Box + Add Shake Animation
       ======================================== */
.error-messages.show {
    animation: shake 0.5s ease-in-out;
    /* Apply shake effect */
}
.logo-img { height: 70px; }
