/* Global styles for TradeBot.Blazor */

/* Base focus styles (removed when using mouse) */
body.using-mouse *:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Keep focus styles for keyboard navigation */
*:focus:not(.focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure buttons and interactive elements have consistent cursor */
button, a, [role="button"], [tabindex] {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Prevent text selection on interactive elements */
button, a, [role="button"], [tabindex], .no-select {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

/* For Blazor's focus handling */
[tabindex="-1"]:focus {
    outline: none !important;
}

/* Remove default button focus styles */
button:focus, button:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove link focus outlines */
a:focus, a:active {
    outline: none !important;
    text-decoration: none;
}

/* For elements that should still be selectable */
.selectable {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Form validation styles */
.invalid {
    border-color: #ef4444 !important; /* red-500 */
}

.dark .invalid {
    border-color: #ef4444 !important; /* red-500 */
}

.validation-message {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc2626; /* red-600 */
}

.dark .validation-message {
    color: #f87171; /* red-400 */
}
