/* Toggle Switch Component */

/* Toggle Card (Container) */
.toggle-card {
  background-color: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.toggle-header {
  display: table;
  width: 100%;
  margin-bottom: 12px;
}

.toggle-label {
  display: table-cell;
  vertical-align: middle;
}

.toggle-label-inner {
  display: table;
}

.toggle-icon {
  vertical-align: middle;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 8px;
  text-align: center;
  line-height: 40px;
  font-size: 20px;
}

.toggle-icon.anonymous {
  background-color: var(--primary-bg);
  color: var(--primary-color);
}

.toggle-icon.contact {
  background-color: var(--success-bg);
  color: var(--success-color);
}

.toggle-text {
  display: table-cell;
  vertical-align: middle;
  padding-left: 12px;
}

.toggle-text h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.toggle-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.toggle-switch-wrapper {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--grey-300);
  border-radius: 28px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: var(--surface);
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider, 
.toggle-input input:checked + .toggle-slider {
  background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(28px);
}

.toggle-info {
  display: table;
  width: 100%;
  padding-top: 12px;
  background-color: transparent;
  border-radius: 6px;
}

.toggle-info i,
.toggle-info .mdi {
  display: table-cell;
  vertical-align: top;
  width: 20px;
  color: var(--primary-color);
  font-size: 18px;
}

.toggle-info span {
  display: table-cell;
  vertical-align: top;
  padding-left: 12px;
}


/* Inline Toggle (kompaktes Layout) */

.toggle-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.toggle-item .toggle-switch {
  flex-shrink: 0;
}

.toggle-item .toggle-item-label {
  font-size: 0.875rem;
  color: var(--text-primary, #1e293b);
  font-weight: 400;
  padding-top: 4px;
}
.toggle-item.disabled {
  cursor: default;
}

.toggle-item.disabled .toggle-switch{
  opacity: 0.8;
  cursor: not-allowed;
}
.toggle-item.disabled .toggle-item-label {
  opacity: 1;
  cursor: default;
}

.toggle-item.disabled .toggle-slider {
  cursor: not-allowed;
}

/* Disabled state for toggle card */
.toggle-card:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.toggle-card:has(input:disabled) .toggle-slider {
  cursor: not-allowed;
}

.toggle-card input:disabled + .toggle-slider,
.toggle-switch input:disabled + .toggle-slider {
  background: var(--grey-200, #e5e7eb);
  cursor: not-allowed;
  opacity: 0.6;
}

.toggle-card input:disabled:checked + .toggle-slider,
.toggle-switch input:disabled:checked + .toggle-slider {
  background: var(--primary-color, #007abb);
  opacity: 0.6;
}

.toggle-switch:has(input:disabled) {
  cursor: not-allowed;
}

/* Size XS - 75% scaled */
.toggle-switch--xs {
  transform: scale(0.75);
  transform-origin: center;
}

.toggle-switch--sm {
  transform: scale(0.9);
  transform-origin: center;
}

.toggle-switch--md {
  transform: scale(1);
  transform-origin: center;
}

.toggle-switch--lg {
  transform: scale(1.1);
  transform-origin: center;
}

/* Toggle Switch Wrapper - Left Aligned variant */
.toggle-switch-wrapper--left {
  text-align: left;
  width: 58px;
  padding-right: 12px;
}