/* ==============================
   CMS z16 – Styl bazowy z z7b/z9
   ============================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: 45px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #acac90;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- Navbar ---- */

.navbar {
    min-height: 40px;
    font-size: 15px;
}

/* ---- Register / Login card ---- */

.register-card {
    max-width: 460px;
    margin: 5rem auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

/* ---- WRAPPER (sidebar + treść) ---- */

.cms-wrapper {
    display: flex;
    flex: 1;
}

/* ---- LEWA CZĘŚĆ – Menu (sidebar) ---- */

.cms-sidebar {
    width: 220px;
    min-width: 220px;
    background: #8a8a70;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-right: 1px solid #6e6e58;
}

.cms-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.cms-menu li a {
    display: block;
    padding: 12px 20px;
    color: #f0f0e0;
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.cms-menu li a:hover {
    background: #9a9a7e;
    color: #fff;
    border-left-color: rgb(34, 255, 0);
}

.cms-menu li a.active {
    background: #9a9a7e;
    color: #fff;
    border-left-color: rgb(34, 255, 0);
    font-weight: 600;
}

.cms-menu li a i {
    margin-right: 8px;
    width: 18px;
    text-align: center;
}

/* ---- PRAWA CZĘŚĆ – Treść ---- */

.cms-content {
    flex: 1;
    padding: 25px 30px;
    overflow-y: auto;
    background: #d4d4b8;
    min-height: calc(100vh - 45px - 21px);
    border-radius: 0;
}

.cms-content h3 {
    color: #333;
    margin-bottom: 5px;
}

.cms-page-content {
    line-height: 1.7;
}

/* ---- Chatbot ---- */

.chatbot-area {
    display: table;
    margin: 0 auto;
}

.chat-main {
    display: table-cell;
    vertical-align: top;
}

.bot-avatar-container {
    display: table-cell;
    vertical-align: middle;
    width: 90px;
    text-align: center;
}

.bot-avatar {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(123, 31, 162, 0.3));
}

.bot-avatar .bot-mouth {
    animation-play-state: paused;
}

.bot-talking .bot-avatar .bot-mouth {
    animation-play-state: running;
}

.chat-form {
    max-width: 600px;
}

.chat-conversation {
    max-width: 600px;
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.chat-bubble p,
.chat-bubble div {
    margin-bottom: 0;
}

.chat-user {
    background: #e8e8d0;
    border-left: 4px solid #6e6e58;
}

.chat-bot {
    background: #f0e8f5;
    border-left: 4px solid #7b1fa2;
}

/* ---- Historia chatbota ---- */

.chat-history-item {
    padding: 12px 0;
    border-bottom: 1px solid #b0b098;
}

.chat-history-item:last-child {
    border-bottom: none;
}

.chat-history-meta {
    margin-bottom: 6px;
}

.chat-history .chat-bubble {
    padding: 8px 12px;
    margin-bottom: 6px;
}

/* ---- Google Maps ---- */

.cms-map-preview iframe {
    width: 100%;
    height: 450px;
    border: 0;
    border-radius: 8px;
    margin-top: 10px;
}

.cms-page-content iframe {
    width: 100%;
    height: 450px;
    border: 0;
    border-radius: 8px;
}

/* ---- CKEditor ---- */

.ck-editor__editable {
    min-height: 300px;
}

/* ---- Google Translate ---- */

.cms-translate {
    position: fixed;
    bottom: 30px;
    right: 10px;
    z-index: 999;
}

/* ---- Footer ---- */

.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 21px;
    font-size: 11px;
    color: rgb(34, 255, 0);
    background-color: #8a8a70;
    border: solid;
    border-width: 1px;
    border-color: rgb(64, 255, 0);
    text-align: center;
    z-index: 1000;
}

/* ---- Responsywność ---- */

@media (max-width: 768px) {
    .cms-wrapper {
        flex-direction: column;
    }

    .cms-sidebar {
        width: 100%;
        min-width: auto;
    }

    .cms-menu li a {
        padding: 10px 15px;
    }

    .cms-content {
        min-height: auto;
        padding: 15px;
    }
}
