/**
 * Calculator Form Layout Styles - Modern & Beautiful
 * Desktop-first responsive design with light/dark theme support
 * All form elements: label, input, select, textarea, tooltips
 */

/* ========== CSS VARIABLES ========== */

:root {
  --form-label-width: 24em;
  --form-gap-h: 16px;
  --form-gap-v: 12px;
  --form-input-gap: 8px;
  --form-radius: 10px;
  --form-transition: 0.2s ease;
  --form-padding: 8px 12px;
  --form-min-height: 38px;
  --text-md: 15px;

  /* Light Theme */
  --light-text: #16202a;
  --light-text-secondary: #43576a;
  --light-bg: #f7f9fc;
  --light-border: #e0e8f0;
  --light-border-hover: #d0dce8;
  --light-border-focus: #0f5b95;
  --light-shadow: 0 2px 8px rgba(8, 27, 44, 0.08);
  --light-shadow-hover: 0 4px 12px rgba(8, 27, 44, 0.12);
  --light-shadow-focus: 0 6px 16px rgba(15, 91, 149, 0.16);
  --light-tooltip-bg: #ffffff;
  --light-tooltip-border: #e0e8f0;
}


/* ========== RADIO & CHECKBOX STYLING ========== */

/* Hide native radio/checkbox */
input[type="radio"],
input[type="checkbox"] {
  display: none;
}

/* Radio/Checkbox Label Styling */
input[type="radio"] + label,
input[type="checkbox"] + label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  margin: 2px 3px 2px 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--light-text);
  background-color: #ffffff;
  border: 2px solid var(--light-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--form-transition);
  white-space: nowrap;
  user-select: none;
  min-height: 28px;
}

html[data-theme="dark"] input[type="radio"] + label,
html[data-theme="dark"] input[type="checkbox"] + label {
  background-color: #1a2332;
  border-color: var(--light-border);
  color: var(--light-text);
}

/* Hover state */
input[type="radio"]:not(:checked) + label:hover,
input[type="checkbox"]:not(:checked) + label:hover {
  border-color: var(--light-border-hover);
  background-color: var(--light-bg);
  box-shadow: 0 2px 4px rgba(18, 35, 53, 0.06);
}

/* Checked state */
input[type="radio"]:checked + label,
input[type="checkbox"]:checked + label {
  background: linear-gradient(135deg, #0f5b95 0%, #1565c0 100%);
  border-color: #0f5b95;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 91, 149, 0.25);
}

html[data-theme="dark"] input[type="radio"]:checked + label,
html[data-theme="dark"] input[type="checkbox"]:checked + label {
  background: linear-gradient(135deg, #61c1ff 0%, #3a9cff 100%);
  border-color: #61c1ff;
  color: #0f1419;
}

/* Focused state */
input[type="radio"]:focus + label,
input[type="checkbox"]:focus + label {
  outline: none;
  border-color: var(--light-border-focus);
  box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.1);
}

html[data-theme="dark"] input[type="radio"]:focus + label,
html[data-theme="dark"] input[type="checkbox"]:focus + label {
  box-shadow: 0 0 0 4px rgba(97, 193, 255, 0.2);
}

/* Disabled state */
input[type="radio"]:disabled + label,
input[type="checkbox"]:disabled + label {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f0f0f0;
  border-color: #d0d0d0;
}

html[data-theme="dark"] input[type="radio"]:disabled + label,
html[data-theme="dark"] input[type="checkbox"]:disabled + label {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #2a3440;
  border-color: #3a4556;
}




.legacy-book-divider-badge {
  width: 100%;
  box-sizing: border-box;

  margin: 16px 0;
  padding: 16px 24px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 14px;
  font-weight: 600;

  color: #00d6c9;

  background: linear-gradient(135deg,
    rgba(0, 214, 201, 0.08) 0%,
    rgba(74, 144, 226, 0.08) 100%);

  border: 2px solid rgba(0, 214, 201, 0.3);
  border-radius: 12px;

  box-shadow:
    0 4px 16px rgba(0, 214, 201, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);

  position: relative;
  overflow: hidden;

  transition: all 0.3s ease;
}

.legacy-book-divider-badge::before,
.legacy-book-divider-badge::after {
  content: "";
  position: absolute;
  top: 0;
  width: 40%;
  height: 100%;
  opacity: 0.05;
  pointer-events: none;
}

.legacy-book-divider-badge::before {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 214, 201, 0.3) 0%, transparent 100%);
  border-radius: 12px 0 0 12px;
}

.legacy-book-divider-badge::after {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 214, 201, 0.3) 0%, transparent 100%);
  border-radius: 0 12px 12px 0;
}

.legacy-book-divider-badge:hover {
  border-color: rgba(0, 214, 201, 0.5);
  box-shadow:
    0 6px 20px rgba(0, 214, 201, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg,
    rgba(0, 214, 201, 0.12) 0%,
    rgba(74, 144, 226, 0.12) 100%);
}

/* Dark theme */
html[data-theme="dark"] .legacy-book-divider-badge {
  color: #00f0e6;
  background: linear-gradient(135deg,
    rgba(0, 240, 230, 0.06) 0%,
    rgba(97, 193, 255, 0.06) 100%);
  border-color: rgba(0, 240, 230, 0.25);
  box-shadow:
    0 4px 16px rgba(0, 240, 230, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .legacy-book-divider-badge:hover {
  border-color: rgba(0, 240, 230, 0.4);
  box-shadow:
    0 6px 20px rgba(0, 240, 230, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg,
    rgba(0, 240, 230, 0.1) 0%,
    rgba(97, 193, 255, 0.1) 100%);
}

.qlegacy-book-divider  {
  width: 400px;

    background-color: color-mix(in srgb, var(--theme-text) 82%, #0c1723 18%) !important;
    background-image: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--theme-accent-2) 34%, #ffffff 12%), transparent 26%),
    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--theme-accent) 20%, #00d6c9 80%), transparent 22%),
    linear-gradient(135deg,
      color-mix(in srgb, var(--theme-text) 84%, #08111b 16%) 0%,
      color-mix(in srgb, var(--theme-text) 58%, var(--theme-accent) 42%) 40%,
      color-mix(in srgb, var(--theme-accent) 54%, var(--theme-accent-2) 46%) 100%) !important;
    border-color: color-mix(in srgb, var(--theme-accent-2) 18%, #ffffff 12%) !important;
    box-shadow: 0 24px 52px color-mix(in srgb, var(--theme-shadow) 88%, rgba(7, 18, 31, .34)),
    0 1px 0 color-mix(in srgb, #ffffff 5%, transparent) inset !important;
}



html[data-theme="dark"] .legacy-book-divider2, .slegacy-book-divider-badge{
background-color: transparent;
}

.legacy-panel-side{
  border: solid 1px;
  border-radius: 20px;
}
.legacy-pricing-card{
  ul>li{
    list-style: none;
  }
}
.ulres, .legacyResult{
  border: solid 0px;
  margin: 0;
  padding: 0;
}

i{
  cursor: help;
}

html[data-theme="dark"] {
  --light-text: #e8eef5;
  --light-text-secondary: #a8b5c5;
  --light-bg: #1e2531;
  --light-border: #3a4556;
  --light-border-hover: #4a5566;
  --light-border-focus: #61c1ff;
  --light-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --light-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
  --light-shadow-focus: 0 6px 16px rgba(97, 193, 255, 0.2);
  --light-tooltip-bg: #2a3440;
  --light-tooltip-border: #3a4556;
}

/* ========== HOME SECTION ========== */
/* Стили наследуются от styles.css */

/* ========== GLOBAL INPUT/SELECT/TEXTAREA ========== */



input,
select,
textarea {
  min-height: 48px;
  border: 1px solid rgba(15, 76, 129, 0.16);
  background: #ffffff;
  color: #17222d;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(18, 35, 53, 0.04);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.5;
  box-sizing: border-box;
  font-family: inherit;
  transition: all var(--form-transition);
}

input::placeholder,
textarea::placeholder {
  color: #6a7a8c;
  opacity: 1;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(15, 76, 129, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 4px rgba(18, 35, 53, 0.06);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 76, 129, 0.34);
  box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.08), 0 10px 22px rgba(18, 35, 53, 0.08);
}

/* ========== NUMBER INPUT ========== */

input[type="number"] {
  max-width: 6em;
}

/* ========== HAS INLINE CHILD ========== */

.has-inline-child {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--form-input-gap);
}

.has-inline-child > * {
  flex-shrink: 0;
  min-width: auto;
}

.has-inline-child > label {
  flex: 0 0 auto;
}

.has-inline-child > select,
.has-inline-child > div {
  flex: 0 0 auto;
}

/* ========== LEGACY INLINE CONTROLS ========== */

.legacy-inline-controls > span {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 auto !important;
  white-space: nowrap;
}

.legacy-inline-controls > select,
.legacy-inline-controls > input {
  flex: 0 0 auto !important;
}

/* ========== ELEMENTS AFTER <i> IN <li> ========== */

li > i ~ span {
  display: contents;
}

/* ========== LEGACY LABEL INLINE ========== */

.legacy-label-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.legacy-label-copy {
  display: inline;
  text-align: center;
}

/* ========== LEGACY CHILD LEADING TITLE ========== */

.legacy-child-leading-title {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ========== FORM CONTAINER ========== */

#elementsToOperateOn {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.legacy-form-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

#DopsDataOut {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ========== FORM ROWS & ITEMS ========== */

.legacy-panel-main{
  padding: 10px;
  margin: 0px;

}

.legacy-form-list > li,
#DopsDataOut > li,
#DopsDataOut li {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--form-gap-h);
  padding: var(--form-gap-v) 0;
  box-sizing: border-box;
  min-height: var(--form-min-height);
  width: 100%;
  border-bottom: 1px solid rgba(224, 232, 240, 0.3);
  overflow: visible !important;
  position: relative;
}

html[data-theme="dark"] .legacy-form-list > li,
html[data-theme="dark"] #DopsDataOut > li,
html[data-theme="dark"] #DopsDataOut li {
  border-bottom-color: rgba(58, 69, 86, 0.3);
}

.legacy-form-list > li:last-child,
#DopsDataOut > li:last-child,
#DopsDataOut li:last-child {
  border-bottom: none;
}

/* ========== LABELS ========== */

.legacy-form-list label,
#DopsDataOut li > label {
  width: 12em;
  min-width: 12em;
  max-width: 12em;
  flex-shrink: 0;

  margin: 0;
  padding: 10px 20px;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  text-align: right !important;
  direction: ltr !important;

  position: relative;
  overflow: visible !important;
  z-index: 100;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;

  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  color: var(--light-text-secondary);
  background-color: rgba(15, 76, 129, 0.06);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 3px rgba(18, 35, 53, 0.08);
}

html[data-theme="dark"] .legacy-form-list label,
html[data-theme="dark"] #DopsDataOut li > label {
  background-color: rgba(97, 193, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.legacy-form-list label span,
.legacy-form-list label i,
#DopsDataOut li > label span,
#DopsDataOut li > label i {
  display: inline;
  margin: 0;
  padding: 0;
}





.legacy-form-list label::after,
#DopsDataOut li > label::after {
  content: "";
}

/* ========== INLINE CONTROLS ========== */

.legacy-inline-controls {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: var(--form-input-gap) !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: auto !important;
}

.legacy-inline-controls > * {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.legacy-child-leading-title + .legacy-inline-controls {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
}

/* ========== INPUTS, SELECTS, TEXTAREAS ========== */

.legacy-form-list input,
.legacy-form-list select,
.legacy-form-list textarea,
#DopsDataOut input,
#DopsDataOut select,
#DopsDataOut textarea {
  box-sizing: border-box;
  font-family: inherit;
  transition: all var(--form-transition);
}


.legacy-form-list input::placeholder,
.legacy-form-list textarea::placeholder,
#DopsDataOut input::placeholder,
#DopsDataOut textarea::placeholder {
  color: var(--light-text-secondary);
  opacity: 0.6;
}

.legacy-form-list input:hover,
.legacy-form-list select:hover,
.legacy-form-list textarea:hover,
#DopsDataOut input:hover,
#DopsDataOut select:hover,
#DopsDataOut textarea:hover {
  border-color: var(--light-border-hover);
  box-shadow: var(--light-shadow-hover);
}

.legacy-form-list input:focus,
.legacy-form-list select:focus,
.legacy-form-list textarea:focus,
#DopsDataOut input:focus,
#DopsDataOut select:focus,
#DopsDataOut textarea:focus {
  outline: none;
  border-color: var(--light-border-focus);
  box-shadow: var(--light-shadow-focus);
}

/* ========== CHANGED STATE ========== */

.legacy-form-list .changedvalue,
#DopsDataOut .changedvalue {
  color: #1565c0 !important;
  border-color: rgba(21, 101, 192, 0.28) !important;
  background: #eef5ff !important;
}

html[data-theme="dark"] .legacy-form-list .changedvalue,
html[data-theme="dark"] #DopsDataOut .changedvalue {
  color: #61c1ff !important;
  border-color: rgba(97, 193, 255, 0.28) !important;
  background: rgba(97, 193, 255, 0.08) !important;
}

.legacy-form-list > li > label.changedvalue,
#DopsDataOut li > label.changedvalue {
  color: #1565c0;
}

html[data-theme="dark"] .legacy-form-list > li > label.changedvalue,
html[data-theme="dark"] #DopsDataOut li > label.changedvalue {
  color: #61c1ff;
}

/* ========== TOMSELECT STYLING ========== */

#elementsToOperateOn .ts-wrapper {
  width: 100%;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}

#elementsToOperateOn .ts-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--light-border);
  border-radius: var(--form-radius);
  background-color: var(--light-bg);
  padding: var(--form-padding);
  min-height: var(--form-min-height);
  transition: all var(--form-transition);
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.5;
  color: var(--light-text);
  flex-wrap: nowrap;
  white-space: nowrap;
}

#elementsToOperateOn .ts-control:hover {
  border-color: var(--light-border-hover);
  box-shadow: var(--light-shadow-hover);
}

#elementsToOperateOn .ts-wrapper.focus .ts-control,
#elementsToOperateOn .ts-wrapper.dropdown-active .ts-control {
  outline: none;
  border-color: var(--light-border-focus);
  box-shadow: var(--light-shadow-focus);
}

#elementsToOperateOn .ts-control > input {
  font-family: inherit;
}

#elementsToOperateOn .ts-wrapper.single .ts-control::after {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid var(--light-text);
  border-left: none;
  border-top: none;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

#elementsToOperateOn .ts-wrapper.dropdown-active.single .ts-control::after {
  transform: translateY(-35%) rotate(-135deg);
}

#elementsToOperateOn .ts-dropdown {
  border: 1px solid var(--light-border);
  border-radius: var(--form-radius);
  background-color: var(--light-bg);
  box-shadow: var(--light-shadow-focus);
  margin-top: 4px;
  z-index: 1000;
}

#elementsToOperateOn .ts-dropdown-content {
  padding: 4px 0;
}

#elementsToOperateOn .ts-dropdown .option {
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--light-text);
  cursor: pointer;
  transition: background-color var(--form-transition);
}

#elementsToOperateOn .ts-dropdown .option:hover,
#elementsToOperateOn .ts-dropdown .option.active {
  background-color: rgba(15, 91, 149, 0.1);
  color: #0f5b95;
}

html[data-theme="dark"] #elementsToOperateOn .ts-dropdown .option:hover,
html[data-theme="dark"] #elementsToOperateOn .ts-dropdown .option.active {
  background-color: rgba(97, 193, 255, 0.15);
  color: #61c1ff;
}

#elementsToOperateOn .ts-wrapper.changedvalue .ts-control {
  color: #1565c0;
  border-color: rgba(21, 101, 192, 0.28);
  background: #eef5ff;
}

/* ========== NICE-SELECT STYLING ========== */

#elementsToOperateOn .nice-select {
  border: 1px solid var(--light-border);
  border-radius: var(--form-radius);
  background-color: var(--light-bg);
  padding: var(--form-padding);
  min-height: var(--form-min-height);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  transition: all var(--form-transition);
  color: var(--light-text);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

#elementsToOperateOn .nice-select:hover {
  border-color: var(--light-border-hover);
  box-shadow: var(--light-shadow-hover);
}

#elementsToOperateOn .nice-select.open,
#elementsToOperateOn .nice-select.focus {
  outline: none;
  border-color: var(--light-border-focus);
  box-shadow: var(--light-shadow-focus);
}

#elementsToOperateOn .nice-select .list {
  border: 1px solid var(--light-border);
  border-radius: var(--form-radius);
  background-color: var(--light-bg);
  box-shadow: var(--light-shadow-focus);
  margin-top: 4px;
}

#elementsToOperateOn .nice-select .option {
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--light-text);
  transition: background-color var(--form-transition);
}

#elementsToOperateOn .nice-select .option:hover,
#elementsToOperateOn .nice-select .option.selected {
  background-color: rgba(15, 91, 149, 0.1);
  color: #0f5b95;
}

html[data-theme="dark"] #elementsToOperateOn .nice-select .option:hover,
html[data-theme="dark"] #elementsToOperateOn .nice-select .option.selected {
  background-color: rgba(97, 193, 255, 0.15);
  color: #61c1ff;
}

/* Tooltips - see /static/css/tooltip.css for styles */

/* ========== RESPONSIVE - DESKTOP (>= 901px) ========== */

@media (min-width: 901px) {
  .legacy-form-list,
  #DopsDataOut {
    display: flex;
    flex-direction: column;
  }

  .legacy-form-list > li,
  #DopsDataOut > li,
  #DopsDataOut li {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }

  .legacy-form-list label,
  #DopsDataOut li > label {
    width: var(--form-label-width);
    flex-shrink: 0;
  }




  .legacy-form-list label,
  #DopsDataOut li > label {
width: auto;
    min-width: 16em;
    max-width: 16em;
    flex-shrink: 0;
    margin: 0;
    padding: 0.5em 3em 0.5em 3em;
    background-color: rgba(15, 76, 129, 0.06);
    border: none;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 3px rgba(18, 35, 53, 0.08);
  }

  .legacy-inline-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--form-input-gap);
  }
}

/* ========== RESPONSIVE - MOBILE (< 901px) ========== */

@media (max-width: 900px) {
  :root {
    --form-label-width: 100%;
    --form-gap-h: 12px;
    --form-gap-v: 8px;
    --form-input-gap: 8px;
    --form-radius: 12px;
    --form-padding: 6px 8px;
    --form-min-height: 36px;
    --text-md: 15px;
  }











  .legacy-form-list > li, #DopsDataOut > li, #DopsDataOut li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 4px -8px;
    border-bottom: 1px solid rgba(224, 232, 240, 0.5);
    min-height: auto;
}


  html[data-theme="dark"] .legacy-form-list > li,
  html[data-theme="dark"] #DopsDataOut > li,
  html[data-theme="dark"] #DopsDataOut li {
    border-bottom-color: rgba(58, 69, 86, 0.5);
  }
/* Removed broken debug CSS that set min-width:20em and background-color:rgb(68,3,3) on labels */










  .legacy-form-list label i,
  #DopsDataOut li > label i {
display: none;

  }

  .legacy-form-list input,
  .legacy-form-list select,
  .legacy-form-list textarea,
  #DopsDataOut input,
  #DopsDataOut select,
  #DopsDataOut textarea {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 16px;
    border-radius: 10px;
  }

  input[type="number"] {
   /* max-width: 100%;*/
  }

  .legacy-inline-controls {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;

    /*width: 100%;*/
    flex: 1;
  }

.legacy-inline-controls {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    flex: 1;
    justify-content: center;
    align-items: center;
}

  /*
  .legacy-inline-controls > * {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
*/


  .legacy-inline-controls select,
  .legacy-inline-controls input {
    min-height: 36px;
    padding: 6px 8px;
    text-align: center;
  }

  .legacy-mobile-inline-row {
    flex-wrap: wrap !important;
    padding: 8px 0;
  }

  .legacy-mobile-inline-row > label,
  .legacy-color-row > label,
  #DopsDataOut li > label {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
    justify-content: flex-start !important;
    padding: 6px 0 2px !important;
    font-weight: 500 !important;
    border-top: 2px solid rgba(0, 0, 0, 0.2);
  }

  html[data-theme="dark"] .legacy-mobile-inline-row > label,
  html[data-theme="dark"] .legacy-color-row > label,
  html[data-theme="dark"] #DopsDataOut li > label {
    border-top-color: rgba(255, 255, 255, 0.2);
  }

  .legacy-mobile-inline-row > select,
  .legacy-mobile-inline-row > input,
  .legacy-mobile-inline-row > .legacy-inline-controls,
  .legacy-mobile-inline-row > .legacy-color-selects-wrap,
  .legacy-color-row > .legacy-color-selects-wrap,
  #DopsDataOut li > select,
  #DopsDataOut li > input,
  #DopsDataOut li > .legacy-inline-controls {
    width: 100% !important;
    max-width: 100% !important;
  }

  .legacy-color-row,
  #DopsDataOut li {
    flex-wrap: wrap !important;
    padding: 8px 0;
  }
}

/* ========== RADIO GROUP STYLING ========== */

/* Контейнер для кнопок */
.pl-2.legacy-calendar-cursor-group {
  width: auto !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0 !important; /* Убрать пробелы между inline-block */
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 0 !important;
  flex: 1 1 auto !important;
}

/* Скрыть radio и checkbox */
.pl-2.legacy-calendar-cursor-group input[type="radio"],
.pl-2.legacy-calendar-cursor-group input[type="checkbox"] {
  display: none !important;
}

/* Стили для label - фиксированная ширина 80px */
.pl-2.legacy-calendar-cursor-group label {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 140px !important;
  max-width: 180px !important;
  height: auto !important;
  flex-shrink: 0 !important;
  margin: 1px !important;
  padding: 2px !important;
  font-size: 11px !important;
  font-weight: normal !important;
  box-sizing: border-box !important;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  line-height: 1.2 !important;
  min-height: auto !important;
  border: 2px solid var(--light-border) !important;
  border-radius: 8px !important;
  background-color: #ffffff !important;
  color: var(--light-text) !important;
  cursor: pointer !important;
}

/* ========== CATALOG LINK ========== */

.legacy-calendar-detail-row a {
  position: absolute !important;
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 9999 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  min-width: 32px !important;
  min-height: 32px !important;
  padding: 4px 8px !important;

  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  color: #0f5b95 !important;

  background: linear-gradient(135deg, #edf6ff 0%, #dcefff 100%) !important;
  border: 1px solid rgba(15, 91, 149, 0.2) !important;
  border-radius: 8px !important;

  box-shadow: 0 2px 8px rgba(15, 91, 149, 0.08) !important;
  transition: all 0.2s ease !important;

  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.legacy-calendar-detail-row a:hover {
  color: #0a3d73 !important;
  background: linear-gradient(135deg, #dceeff 0%, #cce7ff 100%) !important;
  border-color: rgba(15, 91, 149, 0.3) !important;
  box-shadow: 0 4px 12px rgba(15, 91, 149, 0.12) !important;
  transform: translateY(-1px) !important;
}

html[data-theme="dark"] .legacy-calendar-detail-row a {
  color: #61c1ff;
  background: linear-gradient(135deg, rgba(97, 193, 255, 0.1) 0%, rgba(97, 193, 255, 0.05) 100%);
  border-color: rgba(97, 193, 255, 0.2);
  box-shadow: 0 2px 8px rgba(97, 193, 255, 0.08);
}

html[data-theme="dark"] .legacy-calendar-detail-row a:hover {
  color: #81d4ff !important;
  background: linear-gradient(135deg, rgba(97, 193, 255, 0.15) 0%, rgba(97, 193, 255, 0.1) 100%) !important;
  border-color: rgba(97, 193, 255, 0.3) !important;
  box-shadow: 0 4px 12px rgba(97, 193, 255, 0.15) !important;
}

.legacy-calendar-detail-row {
  overflow: visible !important;
  z-index: 1 !important;
}

/* ========== ADMIN FIELD LINK ========== */
.admin-field-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: var(--accent);
  opacity: 0.4;
  text-decoration: none !important;
  font-size: 15px;
  line-height: 1;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}
.admin-field-link:hover {
  opacity: 1;
  background: rgba(0, 120, 212, 0.1);
}
html[data-theme="dark"] .admin-field-link:hover {
  background: rgba(97, 193, 255, 0.15);
}
