/**
 * ProRank Toggle Components Styles
 * Premium toggle switches and sliders for settings
 */

/* Toggle Track Component - Module Headers with ON/OFF text (Premium Size) */
.prorank-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 16px;
  background-color: #e5e7eb;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.prorank-toggle-track--on {
  background-color: #0369a1;
}

.prorank-toggle-track--off {
  background-color: #94a3b8;
}

.prorank-toggle-track__slider {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.prorank-toggle-track--on .prorank-toggle-track__slider {
  transform: translate(38px, -50%);
}

.prorank-toggle-track__text {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
}

.prorank-toggle-track--off .prorank-toggle-track__text {
  padding-right: 20px;
}

.prorank-toggle-track--on .prorank-toggle-track__text {
  padding-left: 20px;
}

.prorank-toggle-track--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prorank-toggle-track:hover:not(.prorank-toggle-track--disabled) {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.prorank-toggle-track:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

/* Toggle Slider Component - Individual Settings (Premium Size) */
.prorank-toggle-slider {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 13px;
  background-color: transparent;
  cursor: pointer;
}

.prorank-toggle-slider--small {
  width: 40px;
  height: 22px;
}

.prorank-toggle-slider--medium {
  width: 48px;
  height: 26px;
}

.prorank-toggle-slider__track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  background-color: #ccc;
  transition: background-color 0.3s ease;
}

.prorank-toggle-slider--checked .prorank-toggle-slider__track {
  background-color: #2271b1;
}

.prorank-toggle-slider__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.prorank-toggle-slider--small .prorank-toggle-slider__thumb {
  width: 16px;
  height: 16px;
  top: 3px;
  left: 3px;
}

.prorank-toggle-slider--checked .prorank-toggle-slider__thumb {
  transform: translateX(22px);
}

.prorank-toggle-slider--small.prorank-toggle-slider--checked .prorank-toggle-slider__thumb {
  transform: translateX(18px);
}

.prorank-toggle-slider--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prorank-toggle-slider:hover:not(.prorank-toggle-slider--disabled) .prorank-toggle-slider__track {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.prorank-toggle-slider:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

/* Toggle Row Layout for Settings */
.prorank-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

.prorank-toggle-row:last-child {
  border-bottom: none;
}

.prorank-toggle-row label {
  flex: 1;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.prorank-toggle-row .prorank-toggle-slider {
  flex-shrink: 0;
}
