/* ==============================================================================
 * @module  сomment-builder.css
 * @about   Модуль стилей веб-страницы формы комментариев.
 * @purpose Оформление интерфейса авторизации, формы для отправки комментариев в обсуждения.
 * @author  TechLab
 * @version 1.0.0
 * ============================================================================== */

.comment-builder .block {
    background: #fff;
    border: 1px solid #ccc;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.comment-builder h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #444;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-size: 16px;
}

.comment-builder .section-title-clean {
    margin: 0 0 0.6rem 0;
    border: none;
    padding: 0;
}
.comment-builder label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}
.comment-builder input[type="text"], .comment-builder textarea, .comment-builder select {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    background: #fff;
    margin-bottom: 10px;
}
.comment-builder input[type="text"]:last-child, .comment-builder textarea:last-child, .comment-builder select:last-child {
    margin-bottom: 0;
}
.comment-builder .header-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.comment-builder .header-line:last-child {
    margin-bottom: 0;
}
.comment-builder .inline-label {
    font-weight: bold;
    font-size: 15px;
    color: #444;
    white-space: nowrap;
}

/* КАЛИБРОВКА НОВОЙ ДВУХЛИНЕЙНОЙ ШАПКИ */
.comment-builder .input-date {
    width: 100px !important;
    max-width: 100px !important;
    text-align: center;
    font-family: monospace;
    margin-bottom: 0 !important;
    padding: 10px 4px !important; /* Уменьшили боковые паддинги, чтобы текст не сжимался */
}
.comment-builder .input-disc {
    width: 38px !important;
    max-width: 38px !important;
    text-align: center;
    font-family: monospace;
    margin-bottom: 0 !important;
    padding: 10px 2px !important;
}
.comment-builder .input-commit {
    width: 82px !important;
    max-width: 82px !important;
    text-align: center;
    font-family: monospace;
    margin-bottom: 0 !important;
    padding: 10px 4px !important;
}
.comment-builder .draft-select-container {
    flex: 1;
}
.comment-builder .draft-select-container select {
    margin-bottom: 0 !important;
}
.comment-builder .draft-trigger {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.comment-builder .draft-trigger input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    margin: 0;
}

/* СТИЛИ МЕДИА-БЛОКОВ И КНОПОК */
.comment-builder .media-sub-block {
    position: relative;
    border-left: 3px solid #0076ff;
    padding-left: 10px;
    margin-bottom: 15px;
    background: #fbfbfb;
    padding-top: 5px;
    padding-bottom: 28px;
    border-radius: 0 4px 4px 0;
}
.comment-builder .media-sub-block:last-child {
    margin-bottom: 0;
}
.comment-builder .video-block-border {
    border-left-color: #ff9500;
}
.comment-builder .drop-zone {
    border: 2px dashed #bbb;
    padding: 15px;
    text-align: center;
    color: #777;
    background: #fafafa;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 5px;
}
.comment-builder .btn-delete-container {
    position: absolute;
    bottom: 5px;
    right: 5px;
    text-align: right;
    width: 100%;
}
.comment-builder .btn-delete-block {
    background: none;
    color: #ff3b30;
    border: none;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    padding: 2px 5px;
}
.comment-builder .btn-delete-block:hover {
    text-decoration: underline;
}
.comment-builder .btn-add {
    background: #fff;
    color: #0076ff;
    border: 1px dashed #0076ff;
    padding: 8px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
}
.comment-builder .media-add-buttons {
    display: flex;
    gap: 8px;
}
.comment-builder .media-add-buttons .btn-add {
    flex: 1;
    width: auto;
    margin-top: 5px;
    margin-bottom: 5px;
}
.comment-builder .btn-add-video {
    color: #ff9500;
    border-color: #ff9500;
}
.comment-builder .btn {
    background: #0076ff;
    color: #fff;
    border: none;
    padding: 0.75rem;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    margin-top: 1rem;
}

.comment-builder .btn.is-delete-requested {
    background: #d73a49;
}

.comment-builder .btn.is-publish-requested {
    background: #37b24d;
}

/* Управление вложениями медиаблоков */
.comment-builder .drop-zone {
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.comment-builder .drop-zone.is-dragover {
    background: #eef6ff;
    border-color: #0076ff;
}

.comment-builder .media-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 5px;
    padding: 5px 8px;
    background: #f1f1f1;
    border-radius: 4px;
    font-size: 13px;
}

.comment-builder .media-file-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.comment-builder .media-file-remove {
    flex-shrink: 0;
    border: none;
    background: none;
    color: #d93025;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}

.comment-builder .media-file-remove:hover {
    color: #a50000;
}

/* Полная блокировка рабочей области конструктора */
.comment-builder #journal-section.is-locked > :not(#notification) {
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
}

/* Дополнительные стили интерфейса конструктора */
.comment-builder .token-instructions {
    font-size: 13px;
    color: #6c757d;
}
.comment-builder .token-instructions-text {
    margin: 0;
}
.comment-builder .section-title {
    margin-top: 0;
    margin-bottom: 10px;
    color: #444;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-size: 16px;
}
.comment-builder .header-label-spacer {
    margin-left: auto;
}
.comment-builder .publish-block {
    background: #f0f7ff;
    border-color: #b3d7ff;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.comment-builder .publish-option {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-weight: bold;
    font-size: 15px;
    color: #0056b3;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}
.comment-builder .publish-bot-option,
.comment-builder .publish-draft-option {
    margin-left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.comment-builder .publish-block .btn {
    width: 100%;
    flex: 0 0 100%;
    margin-top: 0;
}
.comment-builder .btn-delete-container {
    display: none;
}
.comment-builder .btn-delete-container.is-visible {
    display: block;
}
.comment-builder .file-link-indicator {
    margin-top: 5px;
    font-size: 13px;
    font-family: monospace;
    display: none;
}
.comment-builder .file-link-indicator.is-visible {
    display: block;
}
.comment-builder .media-file-input {
    display: none;
}
.comment-builder #draft-select option.is-incomplete {
    color: #c92a2a;
    background-color: #ffe3e3;
}
.comment-builder #draft-select option.is-incomplete-draft {
    color: #000;
    background-color: #f1f3f5;
}
.comment-builder #draft-select option.is-published-complete {
    color: #2b8a3e;
    background-color: #d3f9d8;
}
.comment-builder #draft-select option.is-delete-requested {
    color: #6c757d;
}

/* Общие стили интерфейса конструктора.
   Скопированы из journal-attendance.css и ограничены областью .comment-builder. */
.comment-builder .auth-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.comment-builder .auth-title {
    margin-top: 0;
    color: #24292e;
}
.comment-builder .auth-desc {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
}
.comment-builder .input-text {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
}
.comment-builder.hidden,
.comment-builder .hidden {
    display: none;
}
.comment-builder .notify {
    padding: 12px;
    margin: 1rem 0;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}
.comment-builder .notify-success {
    background-color: #d3f9d8;
    color: #2b8a3e;
}
.comment-builder .notify-error {
    background-color: #ffe3e3;
    color: #c92a2a;
}
.comment-builder .notify-blue {
    background-color: #e7f5ff;
    color: #1c7ed6;
}
.comment-builder .btn-big {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.comment-builder .btn-auth {
    background-color: #24292e;
    color: white;
}
.comment-builder .margin-top-15 {
    margin-top: 1rem;
}
.comment-builder .btn-logout-svg {
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 0 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: opacity 0.2s, transform 0.2s;
}
.comment-builder .btn-logout-svg:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
.comment-builder .notify-flex-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* Регламент работы с конструктором */
.comment-builder .regulation-summary {
    cursor: pointer;
    color: #24292e;
}
.comment-builder .regulation-summary h4 {
    display: inline;
    margin: 0;
    color: #24292e;
    font-size: 15px;
}
.comment-builder .regulation-content {
    margin-top: 12px;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    color: #495057;
    line-height: 1.6;
}
.comment-builder .regulation-rule-heading {
    margin: 8px 0 4px;
    font-weight: bold;
}
.comment-builder .regulation-rule-text {
    margin: 0 0 4px;
}
.comment-builder .regulation-list {
    margin: 0;
    padding-left: 20px;
}

.comment-builder .regulation-content h4 {
    margin-top: 8px;
    color: #24292e;
    font-size: 15px;
}
