@import url("styles.css");
#tradingPreferencesBox,
#apiPreferencesContainer,
#marketCalendarBox,
#themeSwitcher {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  transform: translateY(8px);
}

.theme-switcher {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.5s ease, transform 0.5s ease;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  box-shadow: -1px 1px 2px 0px rgba(191, 191, 191, 0.71);
  border-radius: 10px;
  padding: 15px;
  max-width: 300px;
  margin: 10px auto;
  text-align: center;
}

.title-slider {
  font-weight: 600;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.slider-section {
  margin-bottom: 24px;
  text-align: center;
}

.tradingPrefBottom > div:not(:last-child) {
  margin-bottom: 24px;
}

.toggle-switch {
  display: flex;
  margin-top: 10px;
  gap: 8px;
  justify-content: center;
}

.tooltip-container-mode {
  position: relative;
  display: inline-block;
}

.tooltip-container-mode input[type="radio"],
.tooltip-container-mode input[type="checkbox"] {
  display: none;
}

.tooltip-container-mode label {
    display: inline-block;
    padding: 5px;
    background: linear-gradient(135deg, #10b9810d, #05966921);
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(200, 200, 200, 0.4);
    border-radius: 8px;
    width: 60px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: -2px 4px 10px 0px rgb(0 0 0 / 13%);
    backdrop-filter: blur(4px);
}



.tooltip-container-mode input:checked + label {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-weight: 600;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}


.tooltip-text-mode {
  visibility: hidden;
  opacity: 0;
  background-color: #333;
  color: #fff;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 4px;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 1000;
  transition: opacity 0.2s ease-in-out;
}

.tooltip-container-mode:hover .tooltip-text-mode {
  visibility: visible;
  opacity: 1;
}

.slider-container {
  position: relative;
  width: 230px;
  height: 30px;
  margin: 20px auto;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.slider-track,
.timeframe-slider-track {
    position: relative;
    margin-top: 15px;
    width: 100%;
    height: 22px;
    background: linear-gradient(to bottom, rgb(255 255 255 / 90%) 0%,  rgb(255 255 255 / 41%) 30%, rgb(0 0 0 / 10%) 100%), linear-gradient(to right, rgba(213, 51, 0, 0.4) 20%, rgba(255, 204, 0, 0.4) 50%, rgba(76, 175, 80, 0.4) 80%);
    border-radius: 5px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), inset 0 -1px 2px rgb(0 0 0 / 12%), 0 2px 4px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(1px);
    transition: all 0.3s ease-in-out;
}

.slider-thumb,
.timeframe-slider-thumb {
    background: linear-gradient(to bottom, rgb(218 218 218 / 99%), rgb(230 230 230 / 60%), rgb(200 200 200 / 60%));
    width: 35px;
    height: 20px;
    border-radius: 5px;
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translate(-50%, 0);
    cursor: grab;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    display: flex
;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(0, 0, 0, 0.05), 0 2px 5px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(1px);
    transition: all 0.2s ease-in-out;
    z-index: 2;
}


.slider-thumb:active {
  cursor: grabbing;
}

.slider-fill,
.timeframe-slider-fill {
  height: 100%;
  border-radius: 5px;
  position: absolute;
  top: 0;
  left: 0;
}

/* --------------------------------- */

.slider-ticks-profit {
  position: absolute;
  top: -13px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.slider-tick-profit {
  width: 1px;
  height: 5px;
  background: #aaa;
}

.slider-tick-profit.large {
  height: 10px;
  background: #666;
}


.slider-ticks {
  position: absolute;
  top: -13px;
  width: 100%;
  height: 20px;
  left: 0;
  pointer-events: none;
}

.slider-tick {
  position: absolute;
  width: 1px;
  height: 5px;
  background: #aaa;
  transform: translateX(-50%);
  top: 0;
}

.slider-tick.large {
  height: 10px;
  background: #666;
}


.slider-breakpoints-profit,
.slider-breakpoints-labels-profit{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #444;
  margin-top: 8px;
  width: 230px;
}

.timeframe-slider-breakpoints {
  position: relative;
  width: 100%;
  height: 20px;
  margin-top: 8px;
}

.timeframe-slider-breakpoints span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 12px;
  color: #444;
  white-space: nowrap;
}


.slider-breakpoints-labels {
  position: absolute;
  width: 105%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.slider-breakpoints-labels span,
.slider-breakpoints span,
.timeframe-slider-breakpoints span {
  text-align: center;
  width: 20px;
}

/* ===== Підказки швидкості ===== */
.timeframe-title-line {
  position: relative;
  text-align: center;
  margin-bottom: 4px;
  height: 24px;
}

.speed-hint {
  position: absolute;
  top: 2px;
  color: #333;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.3s ease;
  z-index: 0;
}

#speedHintLeft {
  left: -5px;
}

#speedHintRight {
  right: -5px;
}

.hidden {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}


/* ===== Position Size ===== */
.position-size-block {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.position-size-label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}

.position-size-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.position-size-select,
.position-size-input {
  padding: 6px 8px;
  border: 1px solid rgba(150, 150, 150, 0.4);
  border-radius: 6px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: -1px 1px 2px 0px rgba(191, 191, 191, 0.71);
  backdrop-filter: blur(2px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.position-size-select:focus,
.position-size-input:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.25);
}

.position-size-input {
  width: 60px;
}

.position-size-submit {
  padding: 5px 10px;
  min-width: 32px;
  height: 26px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 -1px 0 rgba(0,0,0,0.15);
  transition: background 0.2s ease, transform 0.1s ease;
}

.position-size-submit:hover {
  background: linear-gradient(135deg, #059669, #10b981);
}

.position-size-submit:active {
  transform: scale(0.96);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* ===== Disabled ===== */
.settings-controls.disabled,
.position-size-block.disabled,
#sliderContainer.disabled * {
  opacity: 0.8;
  pointer-events: none;
  filter: grayscale(40%);
  cursor: not-allowed;
}

.position-size-block.disabled{
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(40%);
  cursor: not-allowed;
}


.slider-section.disabled {
  cursor: not-allowed;
}

.slider-section.disabled *,
.position-size-block.disabled * {
  pointer-events: none;
  cursor: not-allowed;
}


/* ===== Media  ===== */
@media (max-width: 360px) {
  .slider-container,
  .timeframe-slider-container {
    width: 90%;
  }

  .slider-breakpoints,
  .slider-breakpoints-labels,
  .timeframe-slider-breakpoints {
    width: 100%;
  }

  .position-size-row {
    flex-direction: column;
    align-items: stretch;
  }
}

#settingsBlocker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: not-allowed;
  background-color: transparent;
  pointer-events: auto;
}
