/* Global CSS for PHP pages - Direct usage without compilation */

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page wrapper for proper footer positioning */
.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Main content wrapper */
.main-content {
    flex: 1;
}

/* Header styles */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.header-title a {
    color: white;
    text-decoration: none;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    font-size: 0.9rem;
}

.logout-form {
    margin: 0;
}

.logout-link {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: transparent;
    border: none;
    font: inherit;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout-link:hover {
    background-color: #34495e;
}

.admin-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: #dc3545;
    transition: background-color 0.3s ease;
}

.admin-link:hover {
    background-color: #c82333;
}

/* Main Navigation Menu */
.main-menu {
    background-color: #34495e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-menu .container {
    padding: 0;
}

.menu-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.menu-link:hover {
    background-color: #2c3e50;
    color: white;
    border-bottom-color: #3498db;
}

.menu-item.active .menu-link {
    background-color: #2c3e50;
    border-bottom-color: #3498db;
    color: white;
}

/* Footer styles */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem 0;
    margin-top: auto;
    border-top: 1px solid #34495e;
}

.footer-text {
    text-align: center;
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    width: 100%;
}

.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-message--success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.flash-message--error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.flash-message--warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.flash-message--info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.flash-message__text {
    flex: 1;
    font-weight: 500;
}

.flash-message__close {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.flash-message__close:hover {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .flash-messages {
        position: relative;
        top: 0;
        right: 0;
        max-width: 100%;
        padding: 0 20px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-nav {
        width: 100%;
        justify-content: center;
    }
    
    /* Navigation responsive */
    .menu-list {
        flex-direction: column;
        width: 100%;
    }
    
    .menu-item {
        width: 100%;
    }
    
    .menu-link {
        padding: 0.75rem 1rem;
        text-align: center;
        border-bottom: 1px solid #2c3e50;
        border-bottom-width: 1px;
    }
    
    .menu-link:hover,
    .menu-item.active .menu-link {
        border-bottom-color: #3498db;
        border-bottom-width: 1px;
    }
    
    .footer {
        padding: 1rem 0;
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
}
