/* Общие стили */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Стили для окна диалога */
.dialog-window {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 1200px;
    padding: 20px;
    position: relative;
}

.dialog-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.dialog-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.dialog-header a {
    margin: 0;
    font-size: 20px;
    color: #333;
	margin-left: auto;
}

/* Панель шаблонов */
.template-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.template-panel span {
    font-weight: bold;
    flex-shrink: 0; /* Prevents the "Функции" span from shrinking */
}

.button-p {
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    background-color: #cce7ff;
    color: #004080;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap; /* Prevents button text from wrapping */
}

.button-p:hover {
    background-color: #99cfff;
    box-shadow: 0 2px 6px rgba(0, 64, 128, 0.3);
}

.button-p:active {
    background-color: #66b3ff;
}

/* Стиль для неактивной кнопки */
.button-p:disabled {
  background-color: #ccc;   /* светло-серый фон */
  color: #666;              /* темно-серый текст */
  cursor: not-allowed;      /* курсор "запрещено" */
  opacity: 0.7;             /* чуть прозрачная */
  border: 1px solid #999;   /* граница */
}

/* Структура данных */
.data-block {
    display: flex;
    gap: 20px;
}

.example-block {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    width: 70%;
    position: relative;
}

.example-block h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
}

/* Строки атрибутов */
.attribute-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.example-attribute {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    position: relative;
    background-color: white;
}

.example-attribute label {
    font-size: 10px;
    color: #888;
    position: absolute;
    bottom: -12px;
    left: 5px;
}

.designation {
    font-weight: bold;
}

.name {
    flex-grow: 1;
    font-weight: bold;
}

.description {
    margin-top: 20px;
}

.text-block {
    font-size: 16px;
    font-weight: bold;
}

/* Стили для спойлеров */
.spoiler {
    margin-top: 20px;
}

.spoiler-header {
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 5px;
}

.spoiler-content {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
}

/* Стили для списка внутри спойлера */
.spoiler-content ul {
    padding-left: 20px;
    list-style-type: none;
    padding: 0;
}

.spoiler-content ul li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.spoiler-content ul li label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spoiler-content ul li .process-item {
    cursor: pointer;
    color: #004080;
}

/* Характеристики */
.characteristics {
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff;
}

.characteristics label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f9f9f9;
}

/* Комментарии */
.comments {
    margin-top: 100px;
    margin-bottom: 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff;
    width: 30%;
    box-sizing: border-box;
}

.comments h4 {
    margin-top: 0;
    font-size: 16px;
    color: #333;
}

.comment-text {
    background-color: #ffffcc;
    padding: 10px;
    border-left: 4px solid #ffeb3b;
    font-style: italic;
    margin-top: 10px;
}

/* Текстовая область */
.memo-textarea {
    font-family: Arial, sans-serif;
    font-size: 16px;
    width: 100%;
    resize: none;
    outline: none;
    border: 1px solid #ccc;
    padding: 8px;
    box-sizing: border-box;
}

.loading-bar {
    width: 100%;
    height: 15px;
    animation: loading 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
background: linear-gradient(
        90deg,
        rgba(45, 81, 114, 0) 0%,
        rgba(45, 81, 114, 0.8) 30%,
        rgba(45, 81, 114, 1) 50%,
        rgba(45, 81, 114, 0.8) 70%,
        rgba(45, 81, 114, 0) 100%
    );
    background-size: 200% 100%;
    position: absolute;
    top: 3px;
    left: 0;
}

@keyframes loading {
    0% {
        background-position: 150% 0;
    }
    100% {
        background-position: -150% 0;
    }
}
