/* Tadım POS - Main Stylesheet */

:root {
    --primary-color: #dc3545;
    --primary-dark: #b02a37;
    --success-color: #198754;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

/* Base Styles */
html,
body {
    height: 100%;
}

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

/* Main Content */
.main-content {
    min-height: calc(100vh - 56px);
    padding-bottom: 20px;
}

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

/* Table Cards */
.table-card {
    cursor: pointer;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.table-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.table-card-free {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
}

.table-card-busy {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
}

.table-card-inactive {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #6c757d;
    opacity: 0.7;
}

.table-card-selected {
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.4);
    transform: scale(1.02);
}

/* Order Sidebar */
.order-sidebar {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.order-sidebar .card-header {
    border-radius: 12px 12px 0 0;
}

.order-sidebar .list-group-item {
    border-left: 0;
    border-right: 0;
}

.order-sidebar .list-group-item:first-child {
    border-top: 0;
}

.order-sidebar .btn-group-sm .btn {
    padding: 0.15rem 0.4rem;
}

/* Split Payment Item Selection */
.form-check.p-2.border-bottom:has(.payment-item-check:checked),
.payment-item-row.item-selected {
    background-color: #d4edda;
    border-left: 4px solid #28a745 !important;
}

.payment-item-check:checked+label {
    font-weight: 600;
}

.payment-item-check {
    width: 1.25em;
    height: 1.25em;
    cursor: pointer;
}

.selected-check {
    font-size: 1.1em;
}

/* Sortable Drag & Drop Styles */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen .table-card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
}

.sortable-drag {
    opacity: 1;
}

.table-sort-item {
    cursor: grab;
}

.table-sort-item:active {
    cursor: grabbing;
}

/* New Order Notification (Desktop Only) */
.new-order-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #ffc107;
}

.new-order-notification.fade-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #e9ecef;
    height: 100%;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
    transform: translateY(-2px);
}

.product-card:active {
    transform: scale(0.98);
}

.product-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #333;
}

.product-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Product Grid Container */
.product-grid-container {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

/* Adisyon Card */
.adisyon-card {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.adisyon-body {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

/* Category Tabs */
.category-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
}

.category-tabs::-webkit-scrollbar {
    height: 4px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 4px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
}

/* Payment Method Buttons */
.payment-method {
    border-width: 2px;
}

.payment-method.active {
    border-width: 3px;
    font-weight: 700;
}

/* Tables */
.table> :not(caption)>*>* {
    padding: 0.75rem;
}

/* Toast Styling */
.toast {
    border-radius: 10px;
}

/* Mini Toast for Mobile - small icon badge */
.mini-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
    z-index: 9999;
}

.mini-toast.show {
    opacity: 1;
    transform: scale(1);
}

.mini-toast.hide {
    opacity: 0;
    transform: scale(0.5);
}

/* Order Page Specific */
.order-page {
    background: #f5f5f5;
    min-height: calc(100vh - 56px);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .stat-card .card-title {
        font-size: 1.25rem;
    }

    .table-card {
        min-height: 100px;
    }

    .product-grid-container {
        max-height: 50vh;
    }

    .adisyon-card {
        position: static;
        max-height: none;
    }

    .adisyon-body {
        max-height: 250px;
    }

    .product-card {
        padding: 10px;
    }

    .product-name {
        font-size: 0.8rem;
    }

    .product-price {
        font-size: 1rem;
    }
}

/* PWA Install Button */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Sticky table header */
.table-responsive .sticky-top {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* Input focus state */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Dropdown hover */
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Quick action buttons */
.btn-outline-danger:hover,
.btn-outline-success:hover,
.btn-outline-primary:hover,
.btn-outline-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Animation for adding items */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 0.3s ease-in-out;
}