/* temp/web/css/wiki.css */
:root {
    --sidebar-width: 90px;
    --header-height: 220px;}
body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    padding-right: var(--sidebar-width);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;}
.unified-header {
    position: static;
    height: var(--header-height);
    background-image: url('/img/twc/header.png'); /* Путь для модуля TWC */
    background-size: cover; background-position: center;
    border-bottom: 1px solid #ccc;
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 30px 40px; box-sizing: border-box;}
.header-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%; 
    max-width: 600px;
    align-self: flex-start; 
    margin-top: 30px;}
.header-left h1 { margin: 0; font-size: 2rem; color: #2c3e50; }
.header-left p { margin: 0; color: #555; font-size: 1rem; }
.search-wrapper { display: flex; width: 100%; margin-top: 10px; }
#universal-input {
    flex: 1; padding: 12px 20px;
    border: 1px solid #bdc3c7; border-radius: 20px 0 0 20px;
    font-size: 1rem; outline: none;}
#universal-open-button {
    padding: 0 20px; border: 1px solid #bdc3c7; border-left: none;
    border-radius: 0 20px 20px 0; background: #fff; cursor: pointer;
    color: #555; font-weight: 600;}
#universal-open-button:hover { background: #f9f9f9; color: #27ae60; }
.sidebar-right {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: var(--sidebar-width);
    display: flex; flex-direction: column; align-items: center;
    z-index: 100; justify-content: flex-start;
    padding-top: 30px; gap: 20px; overflow: visible;}
.tool-btn {
    width: 42px; height: 42px;
    border-radius: 50%; border: none; cursor: pointer;
    background: #333; color: white;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.7), 1px 1px 0 rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; transition: transform 0.1s; flex-shrink: 0;
    text-decoration: none;}
.tool-btn:hover { transform: scale(1.1); z-index: 200; }
.btn-home { background-color: #5d4037; } /* Домой/Портал */
.btn-add { background-color: #27ae60; font-size: 1.5rem; } /* Плюс */
.btn-settings { background-color: #7f8c8d; } /* Настройки */
.btn-list { background-color: #2980b9; } /* Список */
.tool-btn::after {
    content: attr(data-title);
    position: absolute; right: 55px; top: 50%; transform: translateY(-50%);
    background: #333; color: #fff; padding: 5px 10px; border-radius: 4px;
    font-size: 0.8rem; white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity 0.2s;}
.tool-btn:hover::after { opacity: 1; }
.side-drawer {
    position: fixed; top: 0; bottom: 0; right: var(--sidebar-width);
    width: 350px; background: #fff;
    border-left: 1px solid #ccc; box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transform: translateX(110%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 110; display: flex; flex-direction: column;
    visibility: hidden; 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;}
.side-drawer.active {transform: translateX(0); visibility: visible;}
.drawer-header {
    padding: 20px; background: #f4f4f4; border-bottom: 1px solid #ddd;
    font-weight: bold; font-size: 1.2rem;
    display: flex; justify-content: space-between; align-items: center;}
.drawer-close { cursor: pointer; color: #999; }
.drawer-content { flex: 1; overflow-y: auto; padding: 0; }
.frame-list { list-style: none; padding: 0; margin: 0; }
.frame-list-item a {
    display: block; 
    padding: 2px 10px; 
    text-decoration: none; 
    color: #333;
    border-bottom: 1px solid #fcfcfc; 
    font-size: 0.95rem;
    line-height: 1.2;
    transition: background 0.1s;}
.frame-list-item a:hover { background-color: #e8f4fd; color: #2980b9; }
#river-container {
    max-width: none;
    padding: 20px 40px;
    margin: 0 auto;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    box-sizing: border-box;}
@media(max-width: 900px) {
    body { padding-right: 0; }
    .unified-header { 
        flex-direction: column;
        height: auto; 
        text-align: center; 
        padding: 20px;}
    .header-left {
        width: 100%; 
        margin-top: 10px;
        align-items: center;}
    .header-logo { margin-top: 15px; margin-left: 0; }
    .sidebar-right {
        top: auto;
        bottom: 0;
        flex-direction: row;
        width: 100%;
        height: 60px;
        padding-top: 0;
        justify-content: center;
        gap: 12px;
        background: rgba(255,255,255,0.92);
        border-top: 1px solid #ddd;
        backdrop-filter: blur(4px);}
    .tool-btn { width: 44px; height: 44px; }
    .tool-btn::after {
        right: auto;
        top: -38px;
        left: 50%;
        transform: translateX(-50%);}
    .side-drawer { top: 0; right: 0; bottom: 60px; z-index: 150; }
    #river-container { height: calc(100vh - var(--header-height) - 60px); }
    #nav-tags-container { flex-direction: row !important; } }
.frame-list-item a {display: flex; align-items: center; text-decoration: none; color: #333;}
.frame-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    background-color: #27ae60; /* Зеленый: В базе (Закрыт) */
    transition: background-color 0.2s, border-color 0.2s;
    border: 1px solid transparent;}
.frame-indicator.status-open {background-color: #2980b9; box-shadow: 0 0 2px #2980b9;}
.frame-indicator.status-edit {background-color: #f1c40f; border-color: #e67e22; box-shadow: 0 0 3px #f1c40f;}
body.import-drag-active::after {
    content: "Отпустите файл JSON для Импорта";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(41, 128, 185, 0.85);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    z-index: 10000;
    pointer-events: none;
    backdrop-filter: blur(3px);}
.card-content-view img,
.card-content-view svg {max-width: 100%; height: auto; display: block;}
.card-content-view,
.card-content-view a {overflow-wrap: break-word; word-break: break-word;}