/* Beef CRM Custom Styles */

:root {
    --beef-primary: #d63384;
    --beef-secondary: #6f42c1;
    --beef-success: #198754;
    --beef-warning: #fd7e14;
    --beef-danger: #dc3545;
    --beef-info: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

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

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.quick-action-btn {
    min-height: 120px;
    text-decoration: none;
    transition: transform 0.2s ease-in-out;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.table-responsive {
    border-radius: 0.375rem;
}

.badge {
    font-size: 0.75em;
}

.dish-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.375rem;
}

.ingredient-stock.low {
    color: var(--beef-danger);
    font-weight: bold;
}

.ingredient-stock.medium {
    color: var(--beef-warning);
}

.ingredient-stock.good {
    color: var(--beef-success);
}

.footer {
    margin-top: auto;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Form styling */
.form-control:focus,
.form-select:focus {
    border-color: var(--beef-primary);
    box-shadow: 0 0 0 0.2rem rgba(214, 51, 132, 0.25);
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .quick-action-btn {
        min-height: 100px;
        font-size: 0.875rem;
    }
    
    .stats-icon {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
}

/* Navigation improvements */
.navbar-nav .dropdown-menu {
    min-width: 180px;
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.navbar-nav .dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.15s ease-in-out;
}

.navbar-nav .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease-in-out;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-item.show .nav-link {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.navbar-nav .dropdown-item.active {
    background-color: var(--beef-primary);
    color: #fff;
}

.navbar-nav .dropdown-item i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
}

/* Sortable drag-and-drop styles */
.sortable-ghost {
    opacity: 0.4;
    background: #c8ebfb;
}

.sortable-chosen {
    cursor: grabbing;
}

.sortable-drag {
    transform: rotate(5deg);
}

.drag-handle:hover {
    color: var(--beef-primary) !important;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Autocomplete Ingredient Selector */
.ingredient-autocomplete {
    position: relative;
}

.ingredient-autocomplete-input {
    width: 100%;
    padding: 0.375rem 2.5rem 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ingredient-autocomplete-input:focus {
    border-color: var(--beef-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(214, 51, 132, 0.25);
}

.ingredient-autocomplete-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out;
}

.ingredient-autocomplete-clear:hover {
    color: var(--beef-danger);
}

.ingredient-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    display: none;
}

.ingredient-autocomplete-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.15s ease-in-out;
}

.ingredient-autocomplete-item:last-child {
    border-bottom: none;
}

.ingredient-autocomplete-item:hover,
.ingredient-autocomplete-item.highlighted {
    background-color: #f8f9fa;
}

.ingredient-autocomplete-item.selected {
    background-color: var(--beef-primary);
    color: white;
}

.ingredient-autocomplete-item-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.ingredient-autocomplete-item-details {
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ingredient-autocomplete-item.selected .ingredient-autocomplete-item-details {
    color: rgba(255, 255, 255, 0.8);
}

.ingredient-autocomplete-unit {
    background-color: #e9ecef;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.ingredient-autocomplete-item.selected .ingredient-autocomplete-unit {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.ingredient-autocomplete-price {
    font-weight: 500;
}

.ingredient-autocomplete-no-results {
    padding: 0.75rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.ingredient-autocomplete-highlight {
    background-color: #fff3cd;
    font-weight: bold;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

.ingredient-autocomplete-item.selected .ingredient-autocomplete-highlight {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Loading state */
.ingredient-autocomplete-loading .ingredient-autocomplete-input {
    background-image: url("data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3e%3cg fill='none' fill-rule='evenodd'%3e%3cg transform='translate(1 1)' stroke='%23000' stroke-width='2'%3e%3ccircle stroke-opacity='.3' cx='9' cy='9' r='9'/%3e%3cpath d='m18,9a9,9 0 0,1 -9,9'%3e%3canimateTransform attributeName='transform' type='rotate' dur='1s' values='0 9 9;360 9 9' repeatCount='indefinite'/%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    padding-right: 2.5rem;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .dropdown,
    .ingredient-autocomplete-dropdown {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
} 