/* General styles */
body {
    padding-bottom: 2rem;
}

/* Make cards look nicer */
.card {
    border-radius: 0.5rem;
    transition: transform 0.2s ease-in-out;
}

.card-header {
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
}

/* Pizza buttons */
.pizza-btn {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
    font-weight: 500;
}

.pizza-btn:hover, .pizza-btn:focus, .pizza-btn.active {
    transform: scale(1.05);
    z-index: 1;
}

/* Ingredient buttons */
.add-ingredient-btn, .remove-ingredient-btn {
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    font-weight: 500;
}

.add-ingredient-btn:hover, .remove-ingredient-btn:hover,
.add-ingredient-btn:focus, .remove-ingredient-btn:focus,
.add-ingredient-btn.active, .remove-ingredient-btn.active {
    transform: scale(1.05);
    z-index: 1;
}

/* Order cards */
.order-card {
    transition: all 0.3s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.order-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Kitchen and delivery cards */
.kitchen-orders .order-card {
    cursor: pointer;
}

/* Highlighted delayed orders */
.order-card.border-danger {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Customer list */
#customersList .list-group-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#customersList .list-group-item:hover {
    background-color: var(--bs-secondary-bg);
}

/* Analytics styling */
.chart-container {
    position: relative;
    height: 300px;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

/* Custom scrollbar for overflow containers */
.scrollable-container {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.scrollable-container::-webkit-scrollbar {
    width: 6px;
}

.scrollable-container::-webkit-scrollbar-track {
    background: var(--bs-dark);
}

.scrollable-container::-webkit-scrollbar-thumb {
    background-color: var(--bs-secondary);
    border-radius: 20px;
}

/* Badge spacing and sizing */
.badge {
    margin: 0.1rem;
    font-size: 0.75rem;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-header h3, .card-header h4 {
        font-size: 1.2rem;
    }
    
    .pizza-btn, .add-ingredient-btn, .remove-ingredient-btn {
        min-height: 70px;
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    .btn {
        padding: 0.375rem 0.5rem;
    }
}

/* Customer grid card styles */
.customer-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

.customer-card:hover, .customer-card:focus {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.customer-card .badge.rounded-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 16px;
}

.border-hover:hover {
    border-color: var(--bs-primary) !important;
}

/* Alphabet filter styling */
.alphabet-btn {
    min-width: 35px;
    margin: 0.1rem;
}

/* Time selector styling */
.time-btn {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.time-btn:hover, .time-btn:focus, .time-btn.active {
    transform: scale(1.05);
    z-index: 1;
}

.time-period-btn {
    padding: 0.6rem 0.5rem;
    font-weight: 500;
}

/* Touch-friendly improvements */
@media (max-width: 992px) {
    .btn, .form-control, .form-select {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .nav-link, .dropdown-item {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    /* Larger touch targets on mobile */
    .customer-card {
        margin-bottom: 0.5rem;
    }
    
    .alphabet-btn {
        min-width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}
