/**
 * WordPress-Style Theme CSS
 * Modern, clean design inspired by WordPress themes
 */

:root {
    --primary-color: #0073aa;
    --secondary-color: #005177;
    --accent-color: #00a0d2;
    --success-color: #46b450;
    --warning-color: #ffb900;
    --danger-color: #dc3232;
    --text-color: #23282d;
    --text-light: #646970;
    --bg-light: #f0f0f1;
    --border-color: #c3c4c7;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text-color);
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* Header Styles */
.site-header {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .navbar-brand a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-header .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.site-header .navbar-nav .nav-link:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Feature Cards */
.feature-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    color: var(--primary-color);
}

/* Stats Cards */
.stats-card {
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Section Title */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.input-group-text {
    background-color: var(--bg-light);
    border-color: var(--border-color);
}

/* Menu Items Grid */
.menu-item-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--white);
}

.menu-item-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.menu-item-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.menu-item-card .card-body {
    padding: 1rem;
}

.menu-item-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.menu-item-card .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
}

/* Footer */
.site-footer {
    background-color: var(--text-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.site-footer h5 {
    color: var(--white);
    margin-bottom: 1rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--white);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Chat Interface */
#chatMessages {
    background-color: #f8f9fa;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    max-width: 70%;
}

.chat-message.customer {
    background-color: var(--primary-color);
    color: var(--white);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-message.system {
    background-color: var(--bg-light);
    color: var(--text-color);
    margin: 0 auto;
    text-align: center;
}

.chat-message .time {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Billing Cart */
#cartItems {
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

/* Tables */
.table {
    background-color: var(--white);
}

.table thead th {
    background-color: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    color: var(--text-light);
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--bg-light);
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Alerts */
.alert {
    border-radius: 6px;
    border: none;
}

/* Chat Widget - Floating on right side bottom */
.chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 999;
    display: flex;
    flex-direction: column;
    max-height: 500px;
    overflow: hidden;
}

.chat-widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
    transition: background 0.3s ease;
}

.chat-widget-header:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.chat-widget-body {
    display: none;
    flex-direction: column;
    height: 400px;
}

.chat-widget-body.show {
    display: flex;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    min-height: 200px;
}

.chat-widget-message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.chat-widget-message.customer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-widget-message.system {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-content {
    margin-bottom: 5px;
    line-height: 1.4;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 5px;
}

.chat-widget-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-widget-input .input-group {
    margin: 0;
}

.chat-widget-input .form-control {
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    padding: 8px 15px;
    font-size: 0.9rem;
}

.chat-widget-input .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-widget-input .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .chat-message {
        max-width: 85%;
    }
    
    .chat-widget {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 10px;
        max-height: 400px;
    }
    
    .chat-widget-body {
        height: 300px;
    }
}

/* Quick Order Menu Styles */
.chat-quick-menu {
    background: white;
}

.quick-menu-items {
    max-height: 200px;
    overflow-y: auto;
}

.quick-menu-item {
    transition: background-color 0.2s ease;
}

.quick-menu-item:hover {
    background-color: #f8f9fa;
}

.chat-cart-summary {
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.chat-cart-items {
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

/* Cart Quantity Controls */
.input-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.input-group-sm input[type="number"] {
    padding: 0.25rem;
    font-size: 0.875rem;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .btn,
    .navbar {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

