.cursor-pointer {
    cursor: pointer;
    transition: transform 0.2s;
}
.cursor-pointer:hover {
    transform: scale(1.05);
}
.cart-item-image {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1px;
    background-color: var(--mud-palette-grey-light);
}
.cart-item-image-sm {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 4px;
    background-color: var(--mud-palette-grey-light);
}
.cart-item-card {
    border-radius: 8px;
}
.cart-item-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1px;
    flex-wrap: wrap;
}
.cart-item-info {
    display: flex;
    align-items: center;
    gap: 1px;
    min-width: 120px;
    flex: 1 1 auto;
}
.cart-item-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
}
.cart-quantity-editor {
    display: flex;
    align-items: center;
    gap: 1px;
}
.cart-qty-input {
    width: 30px;
    text-align: center;
}
.cart-price-total {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-wrap: nowrap;
}
.cart-price-edit {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cart-item-subtotal,
.cart-total-display {
    min-width: 80px;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}
.cart-amount {
    font-size: 1.5em;
}
.cart-currency {
    font-size: 0.85em;
    letter-spacing: 0.5px;
}
.responsive-card-width {
    width: 50%;
    flex: 0 0 auto;
}
@media (min-width: 600px) {
    .responsive-card-width {
        width: 33.33%;
    }
}
@media (min-width: 960px) {
    .responsive-card-width {
        width: 25%;
    }
}

/* Validation error highlight with jiggle animation */
@keyframes jiggle {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.field-error {
    animation: jiggle 0.4s ease-in-out;
}

.field-error .mud-input-outlined-border,
.field-invalid .mud-input-outlined-border {
    border-color: var(--mud-palette-error) !important;
    border-width: 2px !important;
}

.field-error .mud-input-label,
.field-invalid .mud-input-label {
    color: var(--mud-palette-error) !important;
}

/* Persistent invalid state (no animation) */
.field-invalid {
    /* Just the styling, no jiggle */
}

/* Custom notification toast */
.notification-toast {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    animation: slideIn 0.15s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-success {
    background: #4caf50;
    color: white;
}

.notification-warning {
    background: #ff9800;
    color: white;
}

.notification-error {
    background: #f44336;
    color: white;
}

.notification-info {
    background: #2196f3;
    color: white;
}

/* Compact table styling - removes excess column spacing */
.compact-table .mud-table-container {
    overflow-x: auto;
}
.compact-table .mud-table-container > table {
    table-layout: auto;
    width: 100%;
    min-width: 800px; /* Ensure table has minimum width to trigger scroll */
}
.compact-table .mud-table-container > table td,
.compact-table .mud-table-container > table th {
    white-space: nowrap;
    padding: 6px 10px;
}

/* Global Focus Fix: Remove stuck highlight on buttons/checkboxes after click */
.mud-icon-button:focus,
.mud-button-root:focus,
.mud-checkbox:focus-within .mud-button-root {
    background-color: transparent !important;
}

/* Hide tooltips on touch devices to prevent sticky tooltip issue */
@media (hover: none) and (pointer: coarse) {
    .mud-tooltip-root .mud-popover-provider,
    .mud-tooltip {
        display: none !important;
    }
}

/* Filter Grid Layout (from Transactions.razor) */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 600px) {
    .filter-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Utility Classes (from Debts.razor and others) */
.text-nowrap {
    white-space: nowrap;
}
.text-amount {
    font-weight: 600;
    font-size: 1rem;
}
.profit-badge {
    font-weight: 600;
    font-size: 1rem;
    padding: 2px 8px;
    border-radius: 4px;
}
.table-footer-cell {
    border-top: 3px solid #7c4dff;
}
.table-footer-cell-bold {
    border-top: 3px solid #7c4dff;
    font-weight: bold;
}
/* Mobile Bottom Bar Adjustment */
@media (max-width: 959px) {
    header.mud-appbar {
        top: auto !important;
        bottom: 0 !important;
        position: fixed !important;
        box-shadow: 0 -3px 10px rgba(0,0,0,0.2) !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
    }
    
    /* Remove the huge top padding (pt-16 is 64px) */
    /* Target via class only, as element tag matches div or main */
    .mud-main-content,
    .mud-main-content.pt-16 {
        padding-top: 0px !important; 
        margin-top: 0px !important;
        padding-bottom: 80px !important; /* Ensure content is visible above the bottom bar */
    }

    /* Fix Layout wrapper that might be holding space */
    .mud-layout {
        padding-top: 0px !important;
    }

    /* Fix Drawer (Menu) Top Gap */
    /* Force drawer to stick to the very top since the header is gone */
    .mud-drawer.mud-drawer-pos-left, 
    .mud-drawer.mud-drawer-pos-right {
        top: 0 !important;
        height: 100% !important;
        padding-top: 0 !important;
    }
}

