:root {
    --bs-success: #FFFF00;
    --bs-text-success: #FFFF00;
}

* {
    user-select: none;  /* Standard */
    -webkit-user-select: none;  /* Chrome, Safari */
    -moz-user-select: none;  /* Firefox */
    -ms-user-select: none;  /* Internet Explorer/Edge */
    font-family: 'Open Sans', sans-serif;
}

html, body {
    overflow: hidden;
    height: 100%;
}

body {
    background-color: #ced4da;
    margin: 0;
    padding: 0;
}

.custom-scroll::-webkit-scrollbar { /* WebKit (Chrome, Edge, Safari) */
    width: 4px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.custom-scroll .show-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(100, 100, 100, 0.2);
}

.custom-scroll {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.3s ease;
}

.custom-scroll.show-scrollbar {
    scrollbar-color: rgba(100, 100, 100, 0.2) transparent;
}

.navbar {
    height: 60px;
    background-color: #fff;
    z-index: 9999;
}

.navbar .navbar-brand {
    height: 70px;
}

.navbar .navbar-brand img {
    position: relative;
    top: -3px;
}

.navbar .navbar-brand span {
    font-family: 'Audiowide', sans-serif;
    font-weight: 400;
    font-size: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    top: 3px;
    left: 5px;
}

.navbar .d-flex {
    position: relative;
    top: -5px;
}

.navbar .btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar .btn-icon.active {
    background-color: #007bff;
}

.content-wrapper {
    margin-top: 64px;
    height: calc(100% - 64px);
}

.main-content {
    transition: margin-right 0.3s ease;
    padding: 2rem 3rem;
    background-color: #fff;
}

.side-container {
    padding-left: 4px;
}

.custom-sidebar {
    width: 330px;
    height: 100%;
    background-color: #fff;
    display: none;
    transition: transform 0.3s ease;
    z-index: 40;
    padding: 5px !important;
    margin: 0 !important;
}

.custom-sidebar.desktop {
    display: block;
}

.custom-sidebar.mobile {
    position: fixed;
    top: 64px;
    right: 48px;
    height: calc(100% - 64px);
    width: 350px;
    display: block;
    z-index: 55;
    background-color: #fff;
}

.button-panel {
    display: flex;
    flex-direction: column;
    z-index: 50;
}

.button-panel button {
    width: 48px;
    height: 48px;
    border-radius: 0;
    margin: 0;
    border: none;
}

.button-panel button.active {
    background-color: #0d6efd;
    color: white;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.4);
    z-index: 30;
    display: none;
}

#timeframes .btn:last-child {
    margin-left: 3px;
}

#contextMenu {
  position: absolute;
  display: none;
  z-index: 9999;
}

#CharControls {
  height: auto;
  padding: 5px 5px 0 16px;
  max-width: 100%;
}

#CandlestickChart {
  width: 100%;
  height: 400px;
  max-width: 100%;
}

#chart1-container, #chart2-container, #chart3-container {
    position: relative;
    height: 300px;
    width: 100%;
    min-width: 250px;
    overflow: hidden;
}

#TrendBasedIndicators .bg-secondary, #MomentumIndicators .bg-secondary {
    background-color: #6c757d !important;
}

.tooltip-inner {
    text-align: left;
    font-size: 80%;
}

#Pivots.table > :not(caption) > * > * {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

.dataTables_length {
    font-size: 12px;
    color: #333;
}

.dataTables_filter {
    font-size: 12px;
}

.dataTables_filter input {
    font-size: 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    padding: 5px;
}

.dataTables_paginate {
    font-size: 12px;
}

.dataTable {
    padding-top: 10px;
}

#alertsTable td, #alertsLogTable td {
    position: relative;
    width: 100%;
}

#alertsTable td .comands, #alertsLogTable td .comands {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

#alertsTable td:hover .comands, #alertsLogTable td:hover .comands {
    opacity: 1;
    pointer-events: auto;
}

.bootstrap-select .dropdown-toggle.form-select.form-select-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.bootstrap-select .dropdown-toggle.form-select::after {
    display: none;
}

.bootstrap-select .dropdown-toggle.form-select {
    border: 1px solid #ced4da; /* stesso colore dei bordi Bootstrap */
    border-radius: 0.375rem;    /* raggio default di Bootstrap 5 */
    background-color: #fff;     /* fondo bianco coerente */
    padding: 0.25rem 0.5rem;    /* come form-select-sm */
    font-size: 0.875rem;        /* come form-select-sm */
    line-height: 1.5;
}

.bootstrap-select .bs-searchbox input {
    font-size: 0.875rem !important;       /* Dimensione del testo uguale a form-select-sm */
    height: calc(1.5em + 0.75rem) !important; /* Imposta l'altezza simile a form-select-sm */
    padding: 0.25rem 0.5rem !important;   /* Padding uguale a form-select-sm */
    border-radius: 0.2rem !important;     /* Aggiungi se necessario per allineare con form-select-sm */
}

span.icon {
    display: inline-block;
    width: 1.6rem;
    height: 1.6rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

span.icon-assets {
    background-image: url('../images/icons/assets.png');
}

span.icon-alerts {
    background-image: url('../images/icons/alerts.png');
}

#exchange, #tradingMode {
    margin: 0 !important;
    padding: 0.1rem 0.25rem !important;
    font-size: 0.75rem !important;
    height: 22px;
}

th.sortable {
cursor: pointer;
}
th.sortable:after {
content: " ⇅";
font-size: 0.8em;
color: #999;
}
.datatable-controls {
display: flex;
justify-content: space-between;
margin: 10px 0;
}
.datatable-pagination button {
margin: 0 2px;
}

th[data-key] {
    position: relative;
    padding-right: 20px;
}

th[data-key] {
    position: relative;
    padding-right: 20px;
    vertical-align: middle;
}

/* Contenitore per le due frecce */
th[data-key]::before,
th[data-key]::after {
    position: absolute;
    right: 4px;
    left: auto;
    font-size: 0.75rem;
    line-height: 1;
    opacity: 0.1;
    transition: opacity 0.2s;
    display: block;
    width: 1em;
    text-align: center;
    font-size: 10px;
}

/* Freccia su */
th[data-key]::before {
    content: "▲";
    top: 50%;
    transform: translateY(-100%);
}

/* Freccia giù */
th[data-key]::after {
    content: "▼";
    top: 50%;
    transform: translateY(0%);
}

/* Attiva solo la freccia corretta */
th[data-sort="asc"]::before {
    opacity: 1;
}
th[data-sort="desc"]::after {
    opacity: 1;
}

.table-xs td,
.table-xs th {
  padding: 0.4rem 0.3rem !important;
  font-size: 0.8rem !important;
  line-height: 1 !important;
}

pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 1rem;
    position: relative;
}

.copy-btn {
    position: absolute;
    right: 0.5rem;
}