|
|
| Строка 1: |
Строка 1: |
| :root {
| | /* Общее форматирование ячеек таблицы */ |
| --width-layout: 100vw;
| | .experiment-link th, |
| --card-padding: 12px;
| | .experiment-link td { |
| --gap: 14px;
| | vertical-align: middle; |
| --primary-bg: #1a1a1a;
| | border: 2px solid black; |
| --secondary-bg: #2a2a2a;
| | background-color: #212126; |
| --text-color: #e0e0e0;
| |
| --subtext-color: #b0b0b0;
| |
| --border-color: #444444;
| |
| --shadow-color: rgba(0, 0, 0, 0.4);
| |
| --header-bg: #333333;
| |
| --accent-color: #76c7c0;
| |
| --recipe-bg: #222222;
| |
| } | | } |
|
| |
|
| body {
| | /* Скругление углов только у первой и последней ячеек в строке заголовка */ |
| font-family: sans-serif;
| | .experiment-link th { |
| margin: 0;
| | border-radius: 15px 0 0 15px; |
| padding: 0;
| |
| color: var(--text-color);
| |
| font-size: 14px;
| |
| } | | } |
|
| |
|
| /* Возвращаем правило для action span */ | | /* Форматирование ссылок в заголовках таблицы */ |
| .action span { | | .experiment-link th a { |
| position: relative;
| | margin: 7px; |
| top: 10px;
| |
| margin-left: 0;
| |
| } | | } |
|
| |
|
| .chem-container { | | /* Форматирование ссылок в ячейках таблицы */ |
| display: flex;
| | .experiment-link td a { |
| flex-wrap: wrap;
| | margin: 5px 10px; |
| gap: var(--gap);
| | padding: 17px; |
| justify-content: flex-start;
| |
| max-width: 100%;
| |
| overflow-x: hidden;
| |
| margin: 0 auto;
| |
| padding: 14px;
| |
| box-sizing: border-box;
| |
| } | | } |
|
| |
|
| .infoblock { | | /* Общие стили для всех ссылок */ |
| display: flex;
| | .experiment-link a { |
| flex-direction: column;
| | text-decoration: none; |
| flex-grow: 1;
| | font: small-caps bold 25px sans-serif; |
| flex-basis: calc((100% - 3 * var(--gap)) / 4);
| | color: #ffffff; |
| margin: 10px 0;
| | border: 2px solid black; |
| padding: var(--card-padding);
| | display: flex; |
| background: var(--primary-bg);
| | align-items: center; |
| border: 1px solid var(--border-color);
| | background-color: #141417; |
| border-radius: 10px;
| | transition: background-color 1.0s ease, border-color 1.0s ease, color 1.0s ease; |
| box-shadow: 0 1px 6px var(--shadow-color);
| |
| font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
| |
| color: var(--text-color);
| |
| transition: box-shadow 0.3s ease, background-color 0.3s ease;
| |
| box-sizing: border-box;
| |
| min-width: 250px;
| |
| max-width: 100%;
| |
| } | | } |
|
| |
|
| .infoblock:hover {
| | /* Стили для мобильных устройств */ |
| box-shadow: 0 4px 12px var(--shadow-color);
| | @media screen and (max-width:850px) { |
| | .experiment-link a { |
| | transition: none; |
| | } |
| | .experiment-link td { |
| | border-radius: 0px 15px 15px 0px; |
| | } |
| } | | } |
|
| |
|
| .header {
| | /* Стили при наведении курсора на строку таблицы */ |
| display: flex;
| | .experiment-link tr:hover a { |
| align-items: center;
| | background-color: black; |
| gap: 6px;
| | color: #fff; |
| margin-bottom: 10px;
| | border-color: #e23229; |
| padding: 4px 10px;
| |
| font-size: 1.1em;
| |
| font-weight: 700;
| |
| background: var(--header-bg);
| |
| border-radius: 6px;
| |
| color: var(--accent-color);
| |
| user-select: none;
| |
| }
| |
| | |
| .title {
| |
| font-weight: bold;
| |
| user-select: none;
| |
| }
| |
| | |
| .content {
| |
| flex-grow: 1;
| |
| display: flex;
| |
| flex-direction: column;
| |
| gap: 10px;
| |
| margin-bottom: 16px;
| |
| }
| |
| | |
| .recipe-block {
| |
| display: flex;
| |
| flex-wrap: nowrap; /* Не переносим элементы, они остаются в одну строку */
| |
| align-items: center;
| |
| gap: 10px;
| |
| margin-bottom: 10px;
| |
| padding: 10px;
| |
| background-color: var(--recipe-bg);
| |
| border: 1px solid var(--border-color);
| |
| border-radius: 6px;
| |
| min-width: 0;
| |
| max-width: 100%;
| |
| box-sizing: border-box;
| |
| overflow-x: auto; /* Позволяет прокручивать содержимое по горизонтали, если оно не помещается */
| |
| -webkit-overflow-scrolling: touch; /* Улучшает прокрутку на iOS */
| |
| }
| |
| | |
| .materials,
| |
| .result,
| |
| .action { | |
| background: var(--secondary-bg);
| |
| border-radius: 6px;
| |
| box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
| |
| color: var(--text-color);
| |
| font-size: 0.9em;
| |
| padding: 8px 12px;
| |
| display: flex;
| |
| justify-content: flex-start;
| |
| align-items: center;
| |
| text-align: left;
| |
| flex-shrink: 0; /* Не сжимаем эти блоки, они сохраняют свой размер */
| |
| flex-grow: 0; /* Не позволяем им растягиваться */
| |
| flex-basis: auto; /* Базовый размер определяется содержимым */
| |
| min-width: max-content; /* Ширина будет такой, чтобы вместить все содержимое */
| |
| max-width: none; /* Убираем ограничение max-width */
| |
| flex-direction: column;
| |
| box-sizing: border-box;
| |
| }
| |
| | |
| .materials div,
| |
| .result div {
| |
| display: flex;
| |
| justify-content: flex-start;
| |
| align-items: center;
| |
| padding: 2px 0;
| |
| line-height: 1.3;
| |
| width: 100%;
| |
| box-sizing: border-box;
| |
| word-break: break-word; /* перенос слов внутри самого DIV */
| |
| }
| |
| | |
| .mat-name {
| |
| font-weight: bold;
| |
| flex-grow: 1;
| |
| overflow: visible;
| |
| text-overflow: unset;
| |
| white-space: normal;
| |
| word-break: break-word;
| |
| min-width: 0;
| |
| }
| |
| | |
| .mat-qty {
| |
| color: var(--subtext-color);
| |
| font-size: 0.95em;
| |
| width: 50px;
| |
| text-align: right;
| |
| flex-shrink: 0;
| |
| margin-left: 12px;
| |
| box-sizing: border-box;
| |
| }
| |
| | |
| .action {
| |
| flex: 0 0 auto; /* Убираем фиксированную ширину, позволяя ей быть авто */
| |
| padding: 0;
| |
| display: flex;
| |
| justify-content: center;
| |
| align-items: center;
| |
| font-weight: 100;
| |
| color: var(--subtext-color);
| |
| user-select: none;
| |
| cursor: default;
| |
| line-height: 1;
| |
| margin-top: 4px;
| |
| }
| |
| | |
| /* Правило для .action span возвращено в начале файла */
| |
| | |
| .section {
| |
| background: var(--secondary-bg);
| |
| padding: 8px 10px;
| |
| border-radius: 6px;
| |
| box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
| |
| color: var(--text-color);
| |
| font-size: 0.85em;
| |
| margin-top: 16px;
| |
| }
| |
| | |
| .section-title {
| |
| font-weight: bold;
| |
| margin-bottom: 4px;
| |
| }
| |
| | |
| @media (max-width: 1200px) {
| |
| .infoblock {
| |
| flex-basis: calc((100% - 2 * var(--gap)) / 3);
| |
| }
| |
| }
| |
| | |
| @media (max-width: 960px) {
| |
| .infoblock {
| |
| flex-basis: calc((100% - var(--gap)) / 2);
| |
| }
| |
| }
| |
| | |
| @media (max-width: 600px) {
| |
| .infoblock {
| |
| flex-basis: 100%;
| |
| margin: 10px 0;
| |
| }
| |
| | |
| | |
| /* Стили для переключателей/кнопок сворачивания */
| |
| .section-toggle {
| |
| background-color: var(--header-bg); /* Используем цвет заголовка */ | |
| color: var(--accent-color); /* Используем акцентный цвет */ | |
| padding: 8px 10px;
| |
| margin-bottom: 10px; /* Отступ от следующего блока */
| |
| border-radius: 6px; | |
| cursor: pointer; /* Показываем, что это интерактивный элемент */
| |
| font-weight: bold;
| |
| user-select: none; /* Предотвращаем выделение текста при клике */
| |
| transition: background-color 0.2s ease;
| |
| }
| |
| | |
| .section-toggle:hover {
| |
| background-color: #444; /* Немного темнее при наведении */
| |
| }
| |
| | |
| /* Стили для сворачиваемого контента */
| |
| .collapsible-content {
| |
| /* Эти стили будут изменены JS для сворачивания/разворачивания */
| |
| max-height: 1000px; /* Достаточно большое значение для "развернутого" состояния */
| |
| overflow: hidden;
| |
| transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
| |
| opacity: 1;
| |
| }
| |
| | |
| .collapsible-content.collapsed {
| |
| max-height: 0;
| |
| opacity: 0;
| |
| margin-top: 0; /* Убираем лишний отступ, если блок свернут */
| |
| margin-bottom: 0;
| |
| padding-top: 0;
| |
| padding-bottom: 0;
| |
| }
| |
| | |
| /* Дополнительные отступы для section-content внутри section, чтобы не было слипания с toggle */
| |
| .section-content {
| |
| padding-top: 8px; /* Добавляем отступ сверху */
| |
| padding-bottom: 8px; /* Добавляем отступ снизу */
| |
| } | | } |