/*
 * DiziXYZ Restaurant User Panel - Base Styles
 *
 * This file contains shared styles for all pages, including layout,
 * header, footer, and common components.
 *
 * @version 4.6
 * @author DiziXYZ
 */

/* Import Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Apply Inter font and basic styles to the body */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent body from scrolling */
    height: 100vh;
    overflow: hidden;
}

/* Base styles for the main content area */
main {
    /* Make main content area scrollable between header and footer */
    height: 100vh; /* Full viewport height */
    overflow-y: auto;
    box-sizing: border-box; /* Include padding in height calculation */
    padding-top: 90px; /* Space for the fixed header */
    padding-bottom: 100px; /* Increased space for the fixed footer */
}

/*
 * =========================================
 * Header Styles (Redesigned)
 * =========================================
 */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--card-background);
    border-radius: 0 0 1.5rem 1.5rem; /* Rounded bottom corners */
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.app-header .header-content {
    /* Use Grid for perfect centering */
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Left spacer, center content, right spacer */
    align-items: center;
    width: 100%;
    max-width: 1200px; /* Constrain content width */
    margin: 0 auto;
}

.app-header .header-title {
    grid-column: 2 / 3; /* Place in the center column */
    justify-self: center; /* Center horizontally */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
}

.app-header .header-title i {
    font-size: 1.5rem;
}

.app-header .header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.app-header .header-actions {
    grid-column: 3 / 4; /* Place in the right column */
    justify-self: end; /* Align to the end (right) */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header .session-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--background-color);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color-light);
}

.app-header .session-widget i {
    color: var(--primary-color);
}

.app-header #session-timer {
    color: var(--text-color);
    min-width: 35px;
    text-align: center;
}

.app-header .logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.app-header .logout-btn:hover {
    background-color: var(--primary-color-hover);
    box-shadow: 0 4px 10px -2px var(--primary-color-hover);
    transform: translateY(-2px);
}

/*
 * =========================================
 * Header Responsive Styles
 * =========================================
 */
@media (max-width: 768px) {
    .app-header {
        padding: 0.75rem 1rem;
    }
    .app-header .header-title h1 {
        font-size: 1.1rem;
    }
    .app-header .logout-btn span {
        display: none;
    }
    .app-header .logout-btn {
        width: 44px;
        height: 44px;
        justify-content: center;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .app-header .header-title h1 {
        display: none;
    }
    .app-header .session-widget {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    .app-header .header-actions {
        gap: 0.5rem;
    }
}


/*
 * =========================================
 * Bottom Navigation Bar Styles (Attached)
 * =========================================
 */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: var(--card-background);
    border-radius: 1.5rem 1.5rem 0 0; /* Rounded top corners */
    box-shadow: 0 -8px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.bottom-nav-bar ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    max-width: 500px;
    height: 100%;
    list-style: none;
    padding: 0 1rem;
    margin: 0;
}

.bottom-nav-bar li {
    flex: 1;
    text-align: center;
}

.bottom-nav-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color-light);
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 8px 0;
    position: relative;
}

.bottom-nav-bar a .nav-icon {
    font-size: 22px;
    margin-bottom: 4px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-nav-bar a .nav-text {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.3s ease, font-weight 0.3s ease;
}

.bottom-nav-bar a.active {
    color: var(--primary-color);
}

.bottom-nav-bar a.active .nav-icon {
    transform: scale(1.3) translateY(-6px);
}

.bottom-nav-bar a.active .nav-text {
    opacity: 1;
    font-weight: 600;
}

/*
 * =========================================
 * Common Component Styles
 * =========================================
 */
.card {
    background-color: var(--card-background);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--secondary-color);
}

.btn-primary {
    display: inline-block;
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-color-hover);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/*
 * =========================================
 * RTL (Right-to-Left) Overrides
 * =========================================
 */
html[dir="rtl"] .bottom-nav-bar ul {
    flex-direction: row-reverse !important;
}
