/* === GLOBAL STYLES === */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* === ADMIN SIDEBAR === */
.sidebar {
    width: 200px;
    height: 100vh;
    position: fixed;
    background: #333;
    color: white;
    padding: 15px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
}

.sidebar ul li a.active {
    background: #555;
}

/* === CONTENT AREA === */
.content {
    margin-left: 220px; /* Matches sidebar width */
    padding: 20px;
    max-width: calc(100% - 220px); /* Prevents unnecessary shifts */
    box-sizing: border-box; /* Ensures consistent sizing */
}

/* === BUTTON STYLES (Used Everywhere) === */
buttonold {
    background-color: #007BFF;
    color: white;
    padding: 10px 16px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button {
    background-color: #007BFF;
    color: white;
    padding: 6px 12px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: auto;
    min-width: 120px;
}


button:hover {
    background-color: #0056b3;
}

/* === TABLE STYLES (For Orders, Reports, etc.) === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #007BFF;
    color: white;
}

/* Global heading styles */
h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .content {
        margin-left: 0;
        max-width: 100%;
    }
}
.error-message {
    color: red;
    font-weight: bold;
    padding: 10px;
    background: #fdd;
    border: 1px solid red;
    border-radius: 5px;
    margin-bottom: 15px;
}
/* Global Label Styles */
label {
    font-weight: bold;
    display: block; /* Ensures each label is on a new line */
    margin-top: 10px;
}

/* modal login */
.user-menu {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 14px;
}
.user-menu a {
    margin-left: 10px;
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
}


/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
    background: white;
    padding: 20px;
    width: 300px;
    margin: 15% auto;
    text-align: center;
    border-radius: 5px;
}
.close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

/* ðŸ”¹ Header Bar for Cart + Login */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

/* ðŸ”¹ Left Side (Welcome Text) */
.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ðŸ”¹ Ensure Cart & Login Appear in One Row */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between login and cart */
}

/* ðŸ”¹ Fix Login Button */
#login-button {
    display: inline-block; /* Prevent block stacking */
    padding: 6px 12px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

#login-button:hover {
    background: #0056b3;
}

/* 🔹 Standard Button Styling */
.btn-login, .btn-logout {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
}

.btn-login:hover, .btn-logout:hover {
    background-color: #0056b3;
}




/* ðŸ”¹ Ensure Cart & Login Stay on One Line */
.header-actions table {
    border-collapse: collapse;
}

.header-actions td {
    padding: 0;
    vertical-align: middle;
    white-space: nowrap;
}

/* ðŸ”¹ Tiny Cart Button */
/* 🔹 Cart Container */
.cart-container {
    position: relative;
    display: inline-block;
}

/* 🔹 Cart Button */
#cart-icon {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    color: #007bff;
    text-decoration: none;
}

/* 🔹 Small Remove Button */
.remove-cart-item {
    background: none;
    border: none;
    color: red;
    font-size: 10px;
    cursor: pointer;
    padding: 0;
}

/* ✅ Ensure cart dropdown has proper size */
.cart-dropdown {
    display: none;
    position: absolute;
    top: 30px;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    padding: 10px;
    min-width: 220px; /* ✅ Increase width */
    font-size: 13px;
    border-radius: 5px;
    z-index: 1500;
    text-align: left;
}

/* ✅ Show cart when toggled */
.cart-dropdown.visible {
    display: block !important;
}

/* ✅ Make sure the cart items display properly */
#cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

#cart-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
}

#cart-items li:last-child {
    border-bottom: none;
}

/* ✅ Style for empty cart message */
#cart-empty {
    font-size: 13px;
    color: gray;
    text-align: center;
    padding: 5px;
}

/* ✅ Style for checkout button */
.checkout-button {
    background: #28a745;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    display: block;
    margin-top: 8px;
    text-align: center;
}

.checkout-button:hover {
    background: #218838;
}




