/* Custom CSS - Minimal overrides for Bootstrap */

/* Mobile order history cards */
@media (max-width: 991.98px) {
    .mobile-order-card {
        border-bottom: 1px solid #dee2e6;
        padding: 1rem;
    }
    
    .mobile-order-card:last-child {
        border-bottom: none;
    }
    
    /* Better touch targets for mobile buttons */
    .mobile-order-card .btn-sm {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 0.75rem;
        border-radius: 0.375rem;
        font-size: 0.875rem;
    }
    
    /* Improved text contrast and readability */
    .mobile-order-card .fw-bold {
        color: #212529;
        font-weight: 600;
    }
    
    .mobile-order-card .fw-semibold {
        color: #495057;
        font-weight: 500;
    }
    
    .mobile-order-card .text-muted {
        color: #6c757d;
        font-size: 0.85rem;
    }
    
    /* Status badge positioning */
    .mobile-order-card .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.65em;
    }
    
    /* Button gap for better touch */
    .mobile-order-card .gap-2 > * {
        margin-bottom: 0.5rem;
    }
}

/* iPad and tablet optimizations */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* iPad-specific styles for driver dashboard */
    .mobile-delivery-card {
        background: #ffffff;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    }
    
    /* Larger touch targets for iPad */
    .mobile-delivery-card .btn {
        min-height: 48px;
        min-width: 48px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 0.5rem;
    }
    
    /* Better typography for tablet screens */
    .mobile-delivery-card .fw-bold {
        font-size: 1.1rem;
        color: #212529;
    }
    
    .mobile-delivery-card .text-muted {
        font-size: 0.9rem;
        color: #6c757d;
    }
    
    /* Improved card layout spacing */
    .mobile-delivery-card .p-3 {
        padding: 1.5rem !important;
    }
    
    /* Better badge styling for tablets */
    .mobile-delivery-card .badge {
        font-size: 0.85rem;
        padding: 0.5em 0.75em;
    }
}

/* Mobile delivery cards */
.mobile-delivery-card {
    background: #ffffff;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.mobile-delivery-card:last-child {
    border-bottom: 1px solid #dee2e6 !important;
    margin-bottom: 0;
}

/* Ensure good text contrast in mobile cards */
.mobile-delivery-card .fw-bold {
    color: #212529 !important;
}

.mobile-delivery-card .text-muted {
    color: #6c757d !important;
}

.mobile-delivery-card .small {
    color: #495057 !important;
}

/* Custom scrollbar for better usability */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sticky table headers */
.table-responsive {
    max-height: 70vh;
}
.table-responsive thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Add subtle box shadows to cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}
.card.shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Enhanced status badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Make table row hover more distinct */
.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.075);
}

/* Add transition effects to buttons */
.btn {
    transition: all 0.2s ease-in-out;
}

/* Custom spacing utilities */
.mt-6 {
    margin-top: 4rem;
}
.mb-6 {
    margin-bottom: 4rem;
}

/* Semi-transparent overlay for modals */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Add separation between form sections */
form .section-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
    padding-top: 1.5rem;
}

/* Custom form controls focus state */
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Tooltip styling */
.tooltip .tooltip-inner {
    max-width: 300px;
    padding: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

/* Custom styles for dashboard stats */
.stats-card {
    border-radius: 0.5rem;
    overflow: hidden;
}
.stats-icon {
    opacity: 0.25;
    position: absolute;
    right: 1rem;
    bottom: 0.5rem;
    font-size: 4rem;
}

/* Progress bar animations */
.progress-bar {
    transition: width 1s ease;
}

/* Enhance form valid/invalid states */
.was-validated .form-control:valid, .form-control.is-valid {
    border-color: var(--bs-success);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}
.was-validated .form-control:invalid, .form-control.is-invalid {
    border-color: var(--bs-danger);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Better indication for required form fields */
.required-field::after {
    content: '*';
    color: var(--bs-danger);
    margin-left: 0.25rem;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Improved charts appearance */
canvas {
    border-radius: 0.25rem;
}

/* ===== MOBILE OPTIMIZATIONS ===== */

/* Better touch targets for mobile */
@media (max-width: 768px) {
    /* Minimum touch target size of 44px */
    .btn, .form-control, .form-select, .btn-check {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Larger padding for better touch interaction */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-height: 40px;
    }
    
    /* Better form controls for mobile */
    .form-control, .form-select {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Improved spacing between form elements */
    .mb-3 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Stack form elements vertically on mobile */
    .row.g-3 > * {
        margin-bottom: 1rem;
    }
    
    /* Improve table responsiveness */
    .table-responsive {
        max-height: 60vh; /* Reduce height on mobile */
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hide less important table columns on mobile */
    .table th:nth-child(4), /* Category column */
    .table td:nth-child(4),
    .table th:nth-child(6), /* Cost Price column */
    .table td:nth-child(6) {
        display: none;
    }
    
    /* Make table text smaller but readable */
    .table {
        font-size: 0.9rem;
    }
    
    /* Better card spacing on mobile */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Improve navigation dropdowns */
    .dropdown-menu {
        min-width: 250px;
        max-height: 300px;
        overflow-y: auto;
    }
    
    /* Better pagination on mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .page-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve filter forms on mobile */
    .filter-form .col-md-4,
    .filter-form .col-md-3,
    .filter-form .col-md-5,
    .filter-form .col-md-8 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Better button groups */
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
    
    /* Improve modal dialogs */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    /* Better offcanvas for mobile */
    .offcanvas {
        max-width: 85vw;
    }
    
    /* Improve dashboard cards */
    .stats-card {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .stats-icon {
        font-size: 2.5rem;
        opacity: 0.4;
    }
    
    /* Better alert spacing */
    .alert {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    /* Improve header spacing */
    h1, h2, h3, h4, h5, h6 {
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    
    /* Better navbar toggler for all screen sizes */
    .navbar-toggler {
        padding: 0.5rem;
        font-size: 1.25rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 0.25rem;
    }
    
    .navbar-toggler:hover,
    .navbar-toggler:focus {
        border-color: rgba(255, 255, 255, 0.4);
        outline: none;
    }
    
    /* Improve navbar brand */
    .navbar-brand {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }
    
    /* Better search inputs */
    .input-group .form-control {
        border-right: none;
    }
    
    .input-group .btn {
        border-left: none;
        min-width: 50px;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 576px) {
    /* Even more compact layout for very small screens */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Stack buttons vertically */
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Simplify table headers */
    .table thead th {
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
    }
    
    .table tbody td {
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
    }
    
    /* Better action buttons in tables */
    .table .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        margin: 0.1rem;
    }
    
    /* Improve cards for small screens */
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    /* Better modal sizing */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    /* Compact form layout */
    .form-floating > label {
        font-size: 0.9rem;
    }
    
    /* Better dashboard stats */
    .row > .col-md-3,
    .row > .col-lg-3,
    .row > .col-xl-3 {
        margin-bottom: 1rem;
    }
}

/* Mobile-specific table card layout for complex tables */
@media (max-width: 768px) {
    .mobile-card-table {
        display: none; /* Hide original table */
    }
    
    .mobile-card-view {
        display: block;
    }
    
    .mobile-item-card {
        background: var(--bs-dark);
        border: 1px solid var(--bs-border-color);
        border-radius: 0.5rem;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .mobile-item-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.75rem;
        border-bottom: 1px solid var(--bs-border-color);
        padding-bottom: 0.75rem;
    }
    
    .mobile-item-title {
        font-weight: 600;
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .mobile-item-subtitle {
        color: var(--bs-secondary);
        font-size: 0.9rem;
    }
    
    .mobile-item-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .mobile-item-field {
        display: flex;
        flex-direction: column;
        font-size: 0.9rem;
    }
    
    .mobile-item-label {
        color: var(--bs-secondary);
        font-size: 0.8rem;
        text-transform: uppercase;
        margin-bottom: 0.2rem;
    }
    
    .mobile-item-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .mobile-item-actions .btn {
        flex: 1;
        min-width: auto;
    }
}

/* Desktop view hides mobile cards */
@media (min-width: 769px) {
    .mobile-card-view {
        display: none !important;
    }
    
    .mobile-card-table {
        display: block;
    }
}

/* Better focus states for accessibility and mobile */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Improve loading states */
.btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.btn.loading::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Performance Optimizations - Disable expensive transitions on touch devices */
@media (hover: none), (pointer: coarse) {
    /* Disable heavy transitions and hover effects on touch devices */
    .mobile-delivery-card, 
    .mobile-order-card, 
    .card, 
    .btn {
        transition: none !important;
    }
    
    /* Remove hover effects that cause lag on mobile */
    .mobile-delivery-card:hover, 
    .mobile-order-card:hover, 
    .card.shadow:hover {
        background: inherit !important;
        border-color: inherit !important;
        transform: none !important;
        box-shadow: inherit !important;
    }
    
    /* Optimize button interactions for touch */
    .btn {
        touch-action: manipulation;
    }
    
    /* Specific optimizations for navigation buttons */
    .navbar-toggler,
    .dropdown-toggle,
    .nav-link {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Enhanced navbar-toggler for better mobile response */
    .navbar-toggler {
        padding: 0.75rem;
        font-size: 1.5rem;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 0.375rem;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .navbar-toggler:focus {
        outline: none;
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
    }
    
    /* Ensure dropdowns work properly on mobile */
    .dropdown-menu {
        z-index: 9999;
        touch-action: auto;
        min-width: 280px;
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    }
    
    .dropdown-item {
        touch-action: manipulation;
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
    }
    
    /* Immediate visual feedback on touch */
    .btn:active,
    .navbar-toggler:active,
    .dropdown-toggle:active,
    .nav-link:active,
    .table a:active {
        transform: scale(0.98);
        transition: none;
        opacity: 0.8;
    }
    
    /* Enhanced table links for mobile touch */
    .table a {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        border-radius: 0.25rem;
        transition: background-color 0.15s ease;
    }
    
    .table a:hover,
    .table a:focus {
        background-color: rgba(0, 123, 255, 0.1);
        text-decoration: none;
    }
    
    /* Disable expensive modal blur on mobile */
    .modal-backdrop {
        backdrop-filter: none;
    }
}

/* Desktop-only hover effects (lightweight transitions) */
@media (hover: hover) and (pointer: fine) {
    .mobile-delivery-card, 
    .mobile-order-card, 
    .card {
        transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }
    
    .mobile-order-card:hover {
        background-color: #f8f9fa;
    }
    
    .mobile-delivery-card:hover {
        background: #f8f9fa;
        border-color: #adb5bd;
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    }
    
    /* Optimized button transitions for desktop */
    .btn {
        transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }
}

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== ADMIN DESKTOP MODE ON MOBILE ===== */
/* Override mobile optimizations for admin users - keep desktop layout */
@media (max-width: 768px) {
    .admin-user .table th:nth-child(4), /* Category column */
    .admin-user .table td:nth-child(4),
    .admin-user .table th:nth-child(6), /* Cost Price column */
    .admin-user .table td:nth-child(6) {
        display: table-cell !important; /* Show all columns for admin */
    }
    
    .admin-user .table {
        font-size: 0.8rem !important; /* Smaller but still readable */
    }
    
    .admin-user .table-responsive {
        max-height: none !important; /* No height restriction for admin */
    }
    
    .admin-user .mobile-card-table {
        display: block !important; /* Show table instead of cards */
    }
    
    .admin-user .mobile-card-view {
        display: none !important; /* Hide mobile card view */
    }
    
    /* Smaller but usable form controls for admin */
    .admin-user .form-control, 
    .admin-user .form-select {
        font-size: 14px !important;
        padding: 0.5rem !important;
    }
    
    .admin-user .btn {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
        min-height: 36px !important;
    }
    
    .admin-user .btn-sm {
        font-size: 0.8rem !important;
        padding: 0.375rem 0.5rem !important;
        min-height: 32px !important;
    }
    
    /* Keep desktop column layout for admin */
    .admin-user .filter-form .col-md-4,
    .admin-user .filter-form .col-md-3,
    .admin-user .filter-form .col-md-5,
    .admin-user .filter-form .col-md-8 {
        width: auto !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Reduce spacing but keep desktop layout */
    .admin-user .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .admin-user .card {
        margin-bottom: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    /* Even more compact for admin on very small screens */
    .admin-user .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .admin-user .table {
        font-size: 0.75rem !important;
    }
    
    .admin-user .btn {
        font-size: 0.8rem !important;
        padding: 0.375rem 0.5rem !important;
    }
}

/* Enhanced mobile touch targets */
@media (max-width: 768px) {
    /* Disable modal blur for better performance */
    .modal-backdrop {
        backdrop-filter: none;
    }
    
    /* Optimize touch interaction */
    .btn, .form-control, .form-select {
        touch-action: manipulation;
    }
}

/* ===== @MENTION DROPDOWN STYLING ===== */
/* Improved @mention dropdown with high contrast and better readability */
.mention-dropdown {
    position: absolute;
    background: #f8f9fa !important;
    border: 2px solid #0d6efd !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    max-height: 240px !important;
    overflow-y: auto !important;
    z-index: 1050 !important;
    min-width: 280px !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mention-item {
    padding: 12px 16px !important;
    cursor: pointer !important;
    border-bottom: 1px solid #dee2e6 !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.15s ease !important;
    background: transparent !important;
}

.mention-item:last-child {
    border-bottom: none !important;
}

.mention-item:hover,
.mention-item.active {
    background: #0d6efd !important;
    color: white !important;
    transform: translateX(2px);
}

.mention-item:hover small,
.mention-item.active small {
    color: rgba(255, 255, 255, 0.8) !important;
}

.mention-item strong {
    font-weight: 600 !important;
    font-size: 1rem !important;
    color: #212529 !important;
    margin-right: 8px !important;
}

.mention-item:hover strong,
.mention-item.active strong {
    color: white !important;
}

.mention-item small {
    color: #6c757d !important;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    opacity: 0.9;
}

/* Improve scrollbar for mention dropdown */
.mention-dropdown::-webkit-scrollbar {
    width: 6px;
}

.mention-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.mention-dropdown::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 3px;
}

.mention-dropdown::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Add focus ring for accessibility */
.mention-item:focus {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}

/* Animate dropdown appearance */
.mention-dropdown {
    animation: mentionDropdownSlideIn 0.2s ease-out;
}

@keyframes mentionDropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile optimizations for mention dropdown */
@media (max-width: 768px) {
    .mention-dropdown {
        min-width: 260px !important;
        max-height: 200px !important;
        font-size: 0.9rem !important;
    }
    
    .mention-item {
        padding: 14px 16px !important;
        font-size: 0.9rem !important;
    }
    
    .mention-item strong {
        font-size: 0.95rem !important;
    }
    
    .mention-item small {
        font-size: 0.8rem !important;
    }
}

/* Extra small screens */
@media (max-width: 576px) {
    .mention-dropdown {
        min-width: 240px !important;
        left: 1rem !important;
        right: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    .mention-item {
        padding: 12px 14px !important;
    }
}

/* ===== @MENTION HIGHLIGHTING IN CONTENT ===== */
/* Highlighted mentions in task descriptions and updates */
.mention-highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    color: #856404 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border: 1px solid #f7c331 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    position: relative !important;
}

.mention-highlight:hover {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%) !important;
    color: #6c5500 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3) !important;
    border-color: #fdcb6e !important;
}

.mention-highlight:focus {
    outline: 2px solid #0d6efd !important;
    outline-offset: 2px !important;
}

/* Clickable mention tooltip */
.mention-highlight::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: #0d6efd;
    border-radius: 50%;
    opacity: 0.7;
}

/* Mobile optimization for mentions */
@media (max-width: 768px) {
    .mention-highlight {
        padding: 3px 8px !important;
        font-size: 0.9rem !important;
        margin: 1px !important;
    }
}
