/* ================================
   1_tab.php - Вкладка блока
   ================================ */
.tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 8px;
    background: #1a1a1a;
    color: #fff;
    border-bottom: 2px solid #1a1a1a;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tab:hover {
    background: #2a2a2a;
}

.tab span {
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    position: relative;
    top: 1px;
}

.tab button {
    background: transparent;
    border: 0px solid #fff;
    color: #fff;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tab button:hover {
    background: #fff;
    color: #2c3e50;
}

/* Состояние свернутого блока */
.tab.collapsed {
    background: #1a1a1a;
}

/* ================================
   2-1_setings_individ.php - Настройки
   ================================ */

.settings-individ {
    display: none;
    background: #fff3e0; /* бледно-оранжевый фон */
    color: #7a3e00;
    padding: 10px;
    /* Занимает только свою высоту, не растягивается */
}

.settings-individ.is-visible {
    display: block;
}

.settings-individ__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-individ__controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.settings-individ__group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.setting-toggle {
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    background: #ffffff;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #657084;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.04em;
}

.setting-toggle:hover {
    background: #eaf1ff;
    border-color: #9bb8ff;
}

.setting-toggle[data-state="on"] {
    background: #1f6aff;
    border-color: #1f6aff;
    color: #ffffff;
    box-shadow: 0 6px 12px rgba(31, 106, 255, 0.18);
}

.setting-toggle[data-state="off"] {
    background: #f3f4f6;
    border-color: #d0d7e2;
    color: #7b879c;
    box-shadow: none;
}

.setting-toggle:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ================================
   Спойлеры HEADER / FOOTER
   ================================ */

.spoiler {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.spoiler-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 400;
}

.spoiler-arrow {
    transition: transform 0.2s ease;
}

.spoiler-content {
    display: none;
    padding: 8px 12px;
}

.spoiler.is-open .spoiler-arrow {
    transform: rotate(180deg);
}

.spoiler.is-open .spoiler-content {
    display: block;
}

.spoiler.spoiler-disabled .spoiler-toggle {
    cursor: default;
    pointer-events: none;
    opacity: 0.6;
}

.spoiler.spoiler-disabled .spoiler-content {
    display: block !important;
}

.header.section-hidden,
.content.section-hidden,
.footer.section-hidden {
    display: none !important;
}

.border-contetn {
    border: 2px solid #ff4d4d;
}

.block.debug-disabled .settings-individ,
.block.debug-disabled .header,
.block.debug-disabled .footer,
.block.debug-disabled .content {
    background: transparent !important;
}

.block.debug-disabled .header,
.block.debug-disabled .footer,
.block.debug-disabled .content {
    color: #1a1a1a;
}

.block.debug-disabled .border-contetn {
    border: none;
}

/* ================================
   2-2-h_[block_id].php - Хедер
   ================================ */

.header {
    background: #dbeafe; /* бледный синий */
    color: #1a2b4c;
    padding: 0;
    font-size: 10px;
    font-weight: 400;
    /* Занимает только свою высоту, не растягивается */
}

/* ================================
   2-3-c_[block_id].php - Основной контент
   ================================ */

.content {
    flex: 1; /* Растягивается на всё доступное пространство */
    overflow-y: auto; /* Скролл если контента много */
    background: linear-gradient(135deg, #fff5f5 0%, #ffdddd 100%);
    color: #4c1a1a;
    padding: 10px;
}

/* ================================
   2-4-f_[block_id].php - Футер (всегда внизу)
   ================================ */

.footer {
    margin-top: auto; /* Прижимается к низу */
    background: #dbeafe;
    color: #1a2b4c;
    padding: 0;
    font-size: 11px;
    font-weight: 400;
    /* Занимает только свою высоту, не растягивается */
}

.header button,
.footer button {
    padding: 3px 5px;
    font-size: 10px;
}

