/* Global styles for Boundless Dashboard */

/* Prevent text selection and cursor flashing on UI elements */
.card, .card-body, .card-header, .nav-tabs, .nav-link, .dropdown-item, .color-swatch, .alert,
.navbar, .navbar-brand, .btn, .badge, .breadcrumb, .page-title, .page-subtitle,
.status-indicator, .spinner-border, .form-label, .form-selectgroup-label {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Enable pointer cursor and ensure clickability for sortable table headers */
.table th[onclick] {
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Keep text selection enabled for input elements */
input[type="text"], input[type="search"], input[type="email"], input[type="password"], 
textarea, select, .form-control {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Allow text selection for content areas where users might want to copy text */
.table td, .alert-info, .alert-warning, .alert-danger, .alert-success,
p, .text-muted, .small {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Autocomplete dropdown styling */
.autocomplete-container {
    position: relative;
}

.autocomplete-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    border: 1px solid var(--tblr-border-color);
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background: var(--tblr-bg-surface);
    color: var(--tblr-body-color);
    padding: 0 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--tblr-bg-surface);
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    width: 100%;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--tblr-border-color-translucent);
}

.autocomplete-item:hover {
    background: var(--tblr-bg-surface-secondary);
}

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

/* Ensure dropdown container doesn't get clipped */
.autocomplete-container {
    z-index: 1;
}

/* Prevent card overflow from hiding dropdown */
.card {
    overflow: visible;
}

.card-body {
    overflow: visible;
}

/* Ensure dropdown appears above other elements */
.autocomplete-dropdown {
    position: absolute !important;
    z-index: 9999 !important;
}

/* Beacon links use theme default link color */
.beacon-link {
    color: var(--tblr-link-color) !important;
    text-decoration: none;
}

.beacon-link:hover {
    color: var(--tblr-link-hover-color) !important;
    text-decoration: underline;
}