/* ==========================================================================
   GLOBAL CURSOR FIXES
   ========================================================================== */

/* Reset all elements to default cursor - REMOVED user-select: none to allow text copying */
* {
    /* Removed user-select: none - users can now select and copy text */
    cursor: default;
}

/* ==========================================================================
   ALLOW TEXT SELECTION AND TEXT CURSOR FOR INPUT ELEMENTS
   ========================================================================== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[type="week"],
textarea,
.form-control,
.form-input,
[contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    cursor: text !important;
}

/* ==========================================================================
   POINTER CURSOR FOR CLICKABLE ELEMENTS
   ========================================================================== */
button,
.btn,
.button,
a,
.link,
.clickable,
.action-button,
.nav-link,
.dropdown-item,
.dropdown-toggle,
.badge,
.label,
.tab,
.accordion-button,
.accordion-header,
.modal-header .btn-close,
.close,
.delete,
.edit,
.view,
.action,
.menu-item,
.sidebar-link,
.card-clickable,
.table-row-clickable,
.clickable-qty,
.action i,
.fas,
.far,
.fab,
.fal,
input[type="checkbox"],
input[type="radio"],
input[type="submit"],
input[type="button"],
input[type="file"],
select,
.form-select,
.form-check-input,
.form-check-label,
.pagination a,
.pagination span,
.breadcrumb-item a,
.alert-dismissible .btn-close,
.toast .btn-close,
.offcanvas-header .btn-close,
.modal-footer .btn,
.card-header .btn,
.toolbar .btn,
.action-buttons .btn,
.btn-group .btn,
.btn-toolbar .btn,
.list-group-item-action,
.nav-pills .nav-link,
.nav-tabs .nav-link,
.navbar-nav .nav-link,
.navbar-brand,
.carousel-control-prev,
.carousel-control-next,
.carousel-indicators button,
.accordion-collapse,
.collapse,
.collapsible {
    cursor: pointer !important;
}

/* ==========================================================================
   SPECIFIC CURSOR STATES
   ========================================================================== */

/* Disabled elements */
button:disabled,
.btn:disabled,
input:disabled,
textarea:disabled,
select:disabled,
.disabled,
.btn-disabled,
[disabled],
[aria-disabled="true"] {
    cursor: not-allowed !important;
}

/* Loading/Processing states */
.loading,
.processing,
.btn-loading,
.spinner,
.spinner-border,
.spinner-grow {
    cursor: wait !important;
}

/* Resizable elements */
.resizable,
.resize-handle,
.splitter {
    cursor: col-resize !important;
}

/* Draggable elements */
.draggable,
.drag-handle,
.sortable-handle,
[draggable="true"] {
    cursor: move !important;
}

/* Help/Info elements */
.help,
.info,
.tooltip,
.popover,
.question,
[data-bs-toggle="tooltip"],
[data-bs-toggle="popover"],
[title] {
    cursor: help !important;
}

/* ==========================================================================
   SPECIFIC OVERRIDES FOR COMMON ELEMENTS
   ========================================================================== */

/* Table cells - default cursor unless specifically clickable */
td,
th,
.table td,
.table th {
    cursor: default !important;
}

/* Clickable table rows or cells */
tr.clickable,
td.clickable,
th.clickable,
.table-row-clickable,
.table-cell-clickable {
    cursor: pointer !important;
}

/* Form labels - pointer when they have for attribute */
label[for],
.form-label[for],
.form-check-label {
    cursor: pointer !important;
}

/* Headers and titles - default cursor unless clickable */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.title,
.header,
.heading {
    cursor: default !important;
}

/* Clickable headers */
h1.clickable, h2.clickable, h3.clickable, h4.clickable, h5.clickable, h6.clickable,
.title.clickable,
.header.clickable,
.heading.clickable {
    cursor: pointer !important;
}

/* Text content - default cursor */
p,
span,
div,
.text,
.content,
.description,
.info,
.details,
.summary,
.value,
.label-text,
.status,
.badge-text {
    cursor: default !important;
}

/* ==========================================================================
   SPECIFIC FIXES FOR COMMON UI COMPONENTS
   ========================================================================== */

/* Modal components */
.modal-content,
.modal-header,
.modal-body,
.modal-footer {
    cursor: default !important;
}

.modal-header .btn-close,
.modal-footer .btn {
    cursor: pointer !important;
}

/* Card components */
.card,
.card-body,
.card-header,
.card-footer {
    cursor: default !important;
}

.card.clickable,
.card-clickable,
.card-header.clickable {
    cursor: pointer !important;
}

/* Navigation components */
.navbar,
.nav,
.sidebar,
.breadcrumb {
    cursor: default !important;
}

/* Accordion components */
.accordion-item,
.accordion-body {
    cursor: default !important;
}

.accordion-button,
.accordion-header {
    cursor: pointer !important;
}

/* Alert components */
.alert {
    cursor: default !important;
}

.alert-dismissible .btn-close {
    cursor: pointer !important;
}

/* ==========================================================================
   SPECIFIC OVERRIDES FOR ADMIN INTERFACE
   ========================================================================== */

/* POS specific elements */
.transaction-body,
.transaction-row,
.transaction-row span,
.transaction-row strong,
.info-value,
.info-label,
.transaction-total,
.transaction-info,
.customer-info,
.info-column,
.info-group,
.credit-info {
    cursor: default !important;
}

/* POS clickable elements */
.clickable-qty,
.action-button,
.product-search-input,
.warehouse-toggle,
.customer-selector {
    cursor: pointer !important;
}

/* Table specific fixes */
.table-container,
.table-container td,
.table-container th {
    cursor: default !important;
}

.table-container .clickable-qty,
.table-container .action,
.table-container .btn {
    cursor: pointer !important;
}

/* ==========================================================================
   ALLOW TEXT SELECTION FOR SPECIFIC CONTENT
   ========================================================================== */

/* Allow text selection for content that users might want to copy */
.selectable,
.copyable,
.code,
.pre,
pre,
code,
.user-content,
.article-content,
.post-content,
.comment-content,
.message-content,
.description-content {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    cursor: text !important;
}

/* ==========================================================================
   RESPONSIVE CURSOR FIXES
   ========================================================================== */

/* Touch devices - ensure proper cursor behavior */
@media (hover: none) and (pointer: coarse) {
    * {
        cursor: default !important;
    }
    
    button,
    .btn,
    a,
    .clickable,
    .action-button,
    input[type="checkbox"],
    input[type="radio"],
    select {
        cursor: pointer !important;
    }
}

