/* ============================================
   TECH-STC.RU - PRO CALCULATOR
   Minimalist | Tech | Border-radius: 0
   ============================================ */

.calculator-container {
  padding-top: 1rem;
}

.pro-split-calc {
  max-width: 100%;
  margin: 1.4rem auto;
  font-family: var(--font-sans);
  color: var(--color-text);
}

/* ----- Typography ----- */
.pro-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.pro-note {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

/* ----- Grid Layout ----- */
.pro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ----- Form Column ----- */
.pro-form-col {
  background: var(--color-bg-secondary);
  padding: 1.5rem;
  border: 1px solid var(--color-border-light);
  border-radius: 0;
}

.pro-field {
  margin-bottom: 1.25rem;
}

.pro-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-text);
}

.pro-input,
.pro-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  font-size: 1.1rem;
  color: var(--color-text);
  font-family: var(--font-mono);
  background: var(--color-bg);
  transition: border-color var(--transition-fast);
}

.pro-input:focus,
.pro-select:focus {
  border-color: var(--primary);
  outline: none;
}

.pro-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.375rem;
}

/* ----- Checkbox ----- */
.pro-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
}

.pro-checkbox {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ----- Buttons ----- */
.pro-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pro-btn {
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pro-btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.pro-btn-secondary {
  background-color: var(--color-bg);
  border-color: var(--color-border);
  color: var(--color-text);
}

.pro-btn-secondary:hover {
  background-color: var(--color-bg-secondary);
}

.pro-error {
  color: var(--color-error);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  min-height: 1.25rem;
}

/* ----- Results Column ----- */
.pro-results-col {
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 10;
}

.pro-results-card, .pro-export-card {
  background: var(--color-bg);
  padding: 1.5rem;
  border-left: 0;
  /*height: 100%;*/
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.pro-results-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1.25rem 0;
  color: var(--color-text);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.pro-result-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.pro-result-item:last-of-type {
  border-bottom: none;
}

.pro-result-highlight {
  background-color: var(--primary-light);
  margin: 0.5rem -0.75rem;
  padding: 0.875rem 0.75rem;
  border-bottom: none;
}

.pro-result-label {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.pro-result-value {
  font-weight: 600;
  color: var(--color-text);
  font-size: 1rem;
  font-family: var(--font-mono);
}

.pro-result-highlight .pro-result-value {
  color: var(--primary);
}

/* ----- Recommendations ----- */
.pro-recommendations {
  margin-top: auto;
  padding: 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 0;
}

.pro-recommendations-title {
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: var(--color-text);
}

.pro-recommendations-text {
  margin: 0 0 0.5rem 0;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.pro-recommendations-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ----- Normative Footer ----- */
.pro-normative-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-light);
}

.pro-normative-links {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.pro-normative-links a {
  color: var(--primary);
  text-decoration: none;
}

.pro-normative-links a:hover {
  text-decoration: underline;
}

.pro-disclaimer {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

.pro-disclaimer a {
  color: var(--primary);
  text-decoration: none;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .pro-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pro-results-col {
    order: 2;
  }

  .pro-buttons {
    flex-direction: column;
  }

  .pro-btn {
    width: 100%;
  }

  .pro-title {
    font-size: 1.25rem;
  }
}



.pro-field {
    margin-bottom: 1.25rem;
}

.pro-field:last-child {
    margin-bottom: 0;
}

.pro-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text, #202122);
}

.pro-label-hint {
    font-weight: normal;
    font-size: 0.85em;
    color: var(--color-text-muted, #6c757d);
}

.pro-input,
.pro-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border, #d1d5db);
    border-radius: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    background: var(--color-bg, #ffffff);
}

.pro-input:focus,
.pro-select:focus {
    outline: none;
    border-color: var(--primary, #0056b3);
}

.pro-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted, #6c757d);
    margin-top: 0.25rem;
}

.pro-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.pro-checkbox input {
    width: auto;
    margin: 0;
}

.pro-checkbox span {
    flex: 1;
}

.pro-ingredients-container {
    background: var(--color-bg-secondary, #f8f9fa);
    padding: 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
}

.pro-ingredients-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.pro-ingredient-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--color-bg, #ffffff);
    border: 1px solid var(--color-border, #e5e7eb);
}

.pro-ingredient-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 0.75rem;
}

.pro-ingredient-name,
.pro-ingredient-weight {
    margin: 0;
}

.pro-ingredient-allergens {
    margin: 0;
}

.pro-remove-btn {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    line-height: 1;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.pro-add-btn {
    width: 100%;
}

.pro-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pro-results-card {
    background: var(--color-bg, #ffffff);
    padding: 1rem;
    /*max-height: 80vh;*/
    overflow-y: auto;
}

.pro-results-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary, #e74c3c);
}

.pro-result-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.pro-result-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pro-result-group-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary, #e74c3c);
}

.pro-result-list {
    font-size: 0.875rem;
}

.pro-result-list > div {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border, #f0f0f0);
}

.pro-result-list > div:last-child {
    border-bottom: none;
}

.pro-empty-message {
    color: var(--color-text-muted, #6c757d);
    font-style: italic;
    padding: 0.5rem;
    text-align: center;
}

.pro-result-code {
    background: var(--color-bg-secondary, #f4f4f4);
    padding: 0.75rem;
    font-family: monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
    border: 1px solid var(--color-border, #e5e7eb);
}

.pro-collapsible {
    margin-top: 0.5rem;
}

.pro-toggle-btn {
    padding: 0 !important;
    font-size: 0.875rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .pro-ingredient-fields {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}


.pro-checkbox-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pro-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.pro-checkbox input {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.pro-checkbox span {
    flex: 1;
    line-height: 1.1;
    min-width: 200px;
}

.pro-checkbox-wrapper .pro-hint {
    margin-left: 1.5rem;
}

.pro-params-card {
    background: var(--color-bg-secondary, #f8f9fa);
    border: 1px solid var(--color-border, #e5e7eb);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.pro-param-item {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.pro-param-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pro-param-item .pro-checkbox {
    margin-bottom: 0.25rem;
}

.pro-param-item .pro-hint {
    margin-left: 1.5rem;
}

.pro-param-item .pro-label {
    margin-bottom: 0.25rem;
}

/* Специфичные стили для калькулятора себестоимости */
.cost-ingredient-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .cost-ingredient-fields {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.pro-result-highlight {
    background-color: rgba(37, 99, 235, 0.1);
    padding: 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 0;
}

.pro-recommendations {
    background: var(--color-bg-secondary, #f8f9fa);
    padding: 0.75rem;
    border-left: 3px solid var(--primary, #0056b3);
}


/* Дополнительные стили для двух колонок в форме */
.pro-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.pro-result-info {
    background: var(--color-bg-secondary, #f8f9fa);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border, #e5e7eb);
}

.pro-result-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--color-border-light, #f0f0f0);
}

.pro-result-info-row:last-child {
    border-bottom: none;
}

.pro-result-info-label {
    font-weight: 500;
    color: var(--color-text-secondary, #6c757d);
}

.pro-result-info-value {
    font-weight: 600;
    color: var(--color-text, #202122);
    font-family: var(--font-mono, monospace);
}

.pro-result-table-wrapper {
    overflow-x: auto;
}

.pro-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.pro-results-table th,
.pro-results-table td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.pro-results-table th {
    background: var(--color-bg-secondary, #f8f9fa);
    font-weight: 600;
    border-bottom: 2px solid var(--color-border, #d1d5db);
}

.pro-results-table td:not(:first-child) {
    text-align: right;
}

.pro-results-table td:first-child {
    text-align: left;
}

.pro-results-table td:last-child,
.pro-results-table th:last-child {
    background: #fafafa;
    font-weight: 500;
}

@media print {
    .pro-form-col {
        display: none;
    }
    
    .pro-results-single {
        margin-top: 0;
    }
    
    .pro-results-table th,
    .pro-results-table td {
        border: 1px solid #000 !important;
    }
}

@media (max-width: 640px) {
    .pro-two-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .pro-ingredient-fields {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }
}



.pro-title i,
.pro-label i,
.pro-result-group-title i {
    margin-right: 0.5rem;
    color: var(--primary, #0056b3);
}

.pro-results-title i {
    margin-right: 0.5rem;
    color: var(--primary, #0056b3);
}

.pro-btn i {
    margin-right: 0.5rem;
}

.pro-result-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.pro-result-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pro-result-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border-light, #f0f0f0);
}

.pro-result-item:last-child {
    border-bottom: none;
}

.pro-result-label {
    font-weight: 500;
    color: var(--color-text-secondary, #6c757d);
    min-width: 160px;
    display: inline-block;
}

.pro-result-value {
    font-weight: 600;
    color: var(--color-text, #202122);
    font-family: var(--font-mono, monospace);
}

.pro-adjustment-item {
    padding: 0.5rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.pro-adjustment-item i {
    color: var(--color-success, #059669);
    font-size: 0.875rem;
}

.coefficient-highlight {
    background: var(--primary-light, #e0e7ff);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Адаптивность */
@media (max-width: 768px) {
    .pro-result-item {
        flex-direction: column;
    }
    
    .pro-result-label {
        margin-bottom: 0.25rem;
    }
}


/* Дополнительные стили для радио-кнопок */
.pro-radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.pro-radio-label input {
    width: auto;
    margin: 0;
}

.pro-radio-label span {
    font-size: 0.875rem;
    color: var(--color-text, #202122);
}

.pro-radio-label:last-child {
    margin-bottom: 0;
}


.pro-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.pro-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.pro-checkbox-label input {
    margin: 0;
}

.pro-result-highlight {
    background-color: rgba(231, 76, 60, 0.1);
    margin: 0.5rem -0.75rem;
    padding: 0.875rem 0.75rem;
    border-radius: 0;
}

.pro-results-single {
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .pro-checkbox-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pro-buttons {
        flex-direction: column;
    }
    
    .pro-buttons .pro-btn {
        width: 100%;
    }
}

@media print {
    .pro-buttons,
    .pro-results-single button,
    #shelf-life-copy-text {
        display: none !important;
    }  
}


.pro-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--color-border, #ddd);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.pro-tab-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary, #6c757d);
    transition: all 0.2s ease;
}

.pro-tab-btn i {
    margin-right: 0.5rem;
}

.pro-tab-btn:hover {
    color: var(--primary, #e74c3c);
}

.pro-tab-btn.active {
    color: var(--primary, #e74c3c);
    border-bottom: 2px solid var(--primary, #e74c3c);
}

.pro-tab-content {
    display: none;
}

.pro-tab-content.active {
    display: block;
}

/* Стили для документов (печать) */
.ttk-document,
.act-document,
.info-list {
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    line-height: 1.4;
}

.ttk-document h1,
.ttk-document h2,
.ttk-document h3,
.act-document h1,
.act-document h2,
.act-document h3,
.info-list h2,
.info-list h3 {
    font-family: 'Times New Roman', Times, serif;
}

@media print {
    .pro-tabs,
    .pro-print-buttons,
    .accordion__item,
    .technical-passport {
        display: none;
    }
    
    .pro-tab-content {
        display: block !important;
    }
    
    .ttk-document,
    .act-document,
    .info-list {
        margin: 0;
        padding: 0;
    }
}

/* Стили для колонок формы */
.pro-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.pro-col {
    flex: 1;
}

@media (max-width: 768px) {
    .pro-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Стили для таблиц */
.pro-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
}

.pro-table th,
.pro-table td {
    border: 1px solid var(--color-border, #ddd);
    padding: 8px;
    text-align: left;
}

.pro-table th {
    background: var(--color-bg-secondary, #f5f5f5);
    font-weight: 600;
}


.pro-mode-switch {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--color-bg-secondary, #f8f9fa);
    padding: 0.5rem;
    border-radius: 0;
}

.pro-mode-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s ease);
    color: var(--color-text-secondary, #6c757d);
}

.pro-mode-btn i {
    margin-right: 0.5rem;
}

.pro-mode-btn.active {
    background: var(--color-bg, #ffffff);
    color: var(--primary, #0056b3);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pro-radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.pro-radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.pro-radio-label i {
    font-size: 1rem;
}

.pro-info-box {
    background: var(--color-bg-secondary, #f8f9fa);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary, #6c757d);
}

.pro-info-box i {
    color: var(--primary, #0056b3);
    font-size: 1rem;
}

.pro-reference-details {
    margin-top: 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
}

.pro-reference-summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    background: var(--color-bg-secondary, #f8f9fa);
}

.pro-reference-summary i {
    margin-right: 0.5rem;
    color: var(--primary, #0056b3);
}

.pro-reference-content {
    padding: 1rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
}

.reference-table th,
.reference-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.reference-table th {
    font-weight: 600;
    background: var(--color-bg-secondary, #f8f9fa);
}

.reference-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    background: var(--primary-light, #dbeafe);
    color: var(--primary, #0056b3);
}

@media (max-width: 768px) {
    .pro-mode-switch {
        flex-direction: column;
    }
    
    .pro-radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .reference-table th,
    .reference-table td {
        padding: 0.375rem;
        font-size: 0.75rem;
    }
}


.pro-formula {
    background: var(--color-bg-secondary, #f8f9fa);
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    font-family: monospace;
    font-size: 0.875rem;
    text-align: center;
    border-left: 3px solid var(--primary, #0056b3);
}



.pro-mos-bar {
    background: #e5e7eb;
    height: 24px;
    margin: 1rem 0 0.5rem;
    position: relative;
}

.pro-mos-bar-fill {
    background: #10b981;
    height: 100%;
    transition: width 0.3s ease;
}

.pro-mos-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #6c757d;
}

.pro-recommendation-block {
    background: #f0f9ff;
    padding: 1rem;
    border-left: 3px solid #3b82f6;
    font-size: 0.875rem;
}

.pro-warning-block {
    background: #fef2f2;
    padding: 0.75rem;
    border-left: 3px solid #ef4444;
    color: #991b1b;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.pro-result-highlight {
    background: #eff6ff;
    margin: 0.5rem -0.75rem;
    padding: 0.75rem 0.75rem;
    border-radius: 4px;
}

@media print {
    .pro-mos-bar {
        border: 1px solid #000;
        background: none;
    }
    .pro-mos-bar-fill {
        background: #000;
    }
    .pro-recommendation-block {
        border: 1px solid #000;
        background: none;
    }
}


