<?php
// floating_logout_school.php
// Reusable Floating Logout Button for School Panel
?>

<!-- Floating Logout Button -->
<div class="floating-logout-btn">
    <button type="button" class="floating-logout-button" onclick="confirmLogout()">
        <i class="fas fa-sign-out-alt"></i> Logout
    </button>
</div>

<style>
/* Floating Logout Button Styles */
.floating-logout-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.floating-logout-button {
    border-radius: 50px;
    padding: 12px 25px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background-color: #dc3545;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 15px;
}

.floating-logout-button i {
    margin-right: 8px;
}

.floating-logout-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}
</style>

<script>
// Logout confirmation
function confirmLogout() {
    if (confirm('Are you sure you want to logout?')) {
        window.location.href = 'logout.php';
    }
}
</script>