
/* --- app/static/css/shell/chat/chat.css --- */
/* WAI-Core: src/app/static/css/shell/chat/chat.css v16 */

/*==============================
=         CONTAINER           =
==============================*/

.chat-container {
    z-index: 2000;
    display: flex;
}

/*==============================
=         CHAT BOX            =
==============================*/

.chat-box {
    --shell-chat-surface: linear-gradient(135deg, rgba(7, 10, 13, 0.94) 0%, rgba(16, 22, 28, 0.9) 40%, rgba(7, 10, 13, 0.96) 100%);
    --shell-chat-panel: linear-gradient(135deg, rgba(14, 20, 27, 0.95) 0%, rgba(23, 30, 38, 0.92) 100%);
    --shell-chat-accent: rgba(46, 217, 231, 0.45);
    --shell-chat-border: rgba(46, 217, 231, 0.22);
    --shell-chat-text: #f5f7fa;
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 500px;
    max-width: 90vw;
    max-height: 0;
    background: var(--shell-chat-surface);
    border: 1px solid var(--shell-chat-border);
    border-radius: 16px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 100000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 35px rgba(3, 8, 12, 0.4);
    transition: all 0.3s ease-in-out;
}

.chat-box.active {
    opacity: 1;
    max-height: 78vh;
    height: 600px;
    padding: 10px;
    visibility: visible;
    transform: translateY(0);
}

/*==============================
=         CHAT HEADER         =
==============================*/

.chat-header {
    background: linear-gradient(135deg, rgba(15, 28, 38, 0.95), rgba(26, 52, 68, 0.9));
    color: white;
    padding: 6px;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid rgba(46, 217, 231, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2em;
    cursor: move;
}

.chat-user-select {
    background: rgba(11, 16, 20, 0.85);
    color: var(--shell-chat-text);
    border: 1px solid var(--shell-chat-border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    max-width: 200px;
}

.chat-user-select option {
    background-color: #0b1218;
    color: var(--shell-chat-text);
}

.chat-tools-button,
.clear-chat,
.chat-close-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.chat-tools-button:hover {
    color: #74ecf5;
    transform: translateY(-1px);
}

.clear-chat:hover,
.chat-close-button:hover {
    color: #ff8c8c;
    transform: translateY(-1px);
}

/* File: src/app/static/css/shell/chat/chat.css */

/*==============================
=       STATUS SELECTOR       =
==============================*/

.chat-status-select {
    background-color: rgba(11, 16, 20, 0.85);
    color: #cfe7f2;
    border: 1px solid var(--shell-chat-border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.95em;
    font-weight: normal;
    cursor: pointer;
    margin-left: 10px;
    max-width: 140px;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23cfe7f2" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 24px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.chat-status-select option {
    background-color: #0b1218;
    color: #cfe7f2;
}


/*==============================
=         TOOL POPUP          =
==============================*/

#chat-tools-popup {
    position: absolute;
    right: 15px;
    top: 45px;
    background: linear-gradient(135deg, rgba(12, 18, 24, 0.98), rgba(20, 32, 42, 0.95));
    color: #f0f7fa;
    border: 1px solid rgba(46, 217, 231, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    max-width: 320px;
    z-index: 999;
    box-shadow: 0 12px 24px rgba(3, 8, 12, 0.45);
    line-height: 1.4em;
    white-space: normal;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 60vh;
    overflow: hidden;
}

#chat-tools-popup.hidden {
    display: none;
}

#chat-tools-popup h4 {
    margin-bottom: 8px;
    font-size: 14px;
    color: #7cecf5;
    border-bottom: 1px solid rgba(46, 217, 231, 0.2);
    padding-bottom: 6px;
    flex-shrink: 0;
}

#chat-tools-popup ul {
    padding-left: 16px;
    list-style: disc;
    margin: 0;
    overflow-y: auto;
    flex: 1 1 auto;
    scrollbar-gutter: stable;
}

#chat-tools-popup li {
    margin-bottom: 8px;
}

#chat-tools-popup code {
    color: #7cecf5;
    font-weight: bold;
}

/*==============================
=         MESSAGES            =
==============================*/

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--shell-chat-panel);
    border-radius: 0 0 14px 14px;
    border: 1px solid rgba(46, 217, 231, 0.2);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.35);
}

.user-message,
.self-message,
.daemon-message {
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 12px;
    max-width: 95%;
    word-wrap: break-word;
    white-space: pre-wrap;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}

.chat-message {
    position: relative;
}

.runwai-feedback {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.chat-message:hover .runwai-feedback {
    opacity: 1;
    visibility: visible;
}

.runwai-feedback-button {
    background: rgba(8, 12, 16, 0.65);
    border: 1px solid rgba(46, 217, 231, 0.2);
    color: #fff;
    border-radius: 8px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.85em;
    line-height: 1.2;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.runwai-feedback-button:hover:not(:disabled) {
    background: rgba(46, 217, 231, 0.25);
    border-color: rgba(46, 217, 231, 0.5);
    transform: translateY(-1px);
}

.runwai-feedback-button.selected {
    background: #7cecf5;
    border-color: #7cecf5;
    color: #071015;
}

.runwai-feedback-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.runwai-feedback-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}

.runwai-feedback-form--hidden {
    display: none;
}

.runwai-feedback-input {
    width: 170px;
    max-width: 100%;
    min-height: 28px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(46, 217, 231, 0.25);
    background: rgba(8, 12, 16, 0.8);
    color: #fff;
    font-size: 0.8em;
    resize: vertical;
}

.runwai-feedback-submit {
    background: #2ed9e7;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.runwai-feedback-submit:hover:not(:disabled) {
    background: #24b9c4;
}

.runwai-feedback-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.server-message {
    color: #cfe7f2;
    background: none;
    border: none;
    font-size: 0.85em;
    font-style: italic;
    padding: 4px 8px;
    margin: 4px 0;
    align-self: center;
    text-align: center;
    box-shadow: none;
}

.user-message {
    background: rgba(18, 28, 41, 0.92);
    border: 1px solid rgba(46, 217, 231, 0.35);
    color: #f5f7fa;
    align-self: flex-start;
    text-align: left;
}

.self-message {
    background: rgba(46, 217, 231, 0.2);
    border: 1px solid rgba(46, 217, 231, 0.45);
    color: #e9f9fb;
    align-self: flex-end;
    text-align: right;
    margin-left: 30px;
    padding: 8px;
    border-radius: 12px;
    max-width: 95%;
    word-wrap: break-word;
    white-space: pre-wrap;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

.daemon-message {
    background: rgba(18, 28, 41, 0.92);
    border: 1px solid rgba(46, 217, 231, 0.35);
    color: white;
}

/*==============================
=         CHAT FOOTER         =
==============================*/

.chat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 8px 12px;
    margin-right: 0;
    border: 1px solid rgba(46, 217, 231, 0.35);
    border-radius: 12px;
    background: rgba(11, 16, 20, 0.8);
    color: #f5f7fa;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    box-shadow: 0 0 0 2px rgba(46, 217, 231, 0.35);
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-action-button {
    appearance: none;
    background: linear-gradient(135deg, rgba(209, 114, 24, 0.9), rgba(255, 165, 66, 0.9));
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-action-button:hover,
.chat-action-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    outline: none;
}

.chat-action-button:active {
    transform: scale(0.95);
}

.chat-action-icon {
    width: 40px;
    height: 40px;
}

.chat-send-button {
    background: linear-gradient(135deg, rgba(209, 114, 24, 0.95), rgba(255, 180, 90, 0.95));
}

.chat-voice-button {
    position: relative;
    overflow: visible;
}

.chat-voice-button.recording {
    background: linear-gradient(135deg, #f25b5b, #ff9f6a, #f25b5b);
    background-size: 220% 220%;
    box-shadow:
        0 0 0 5px rgba(242, 91, 91, 0.18),
        0 14px 26px rgba(0, 0, 0, 0.35);
    animation:
        chat-voice-gradient 1.4s linear infinite,
        chat-voice-recording 1s ease-in-out infinite;
}

.chat-voice-button.recording::before,
.chat-voice-button.recording::after {
    content: "";
    position: absolute;
    inset: -16%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.65);
    opacity: 0.6;
    animation: chat-voice-ripple 1.3s ease-out infinite;
    pointer-events: none;
}

.chat-voice-button.recording::after {
    animation-delay: 0.45s;
}

.chat-voice-button.recording .chat-action-icon {
    animation: chat-voice-icon 0.8s ease-in-out infinite;
}

.chat-circle.recording {
    background: linear-gradient(135deg, rgba(212, 63, 63, 0.95), rgba(255, 115, 115, 0.95));
    animation: chat-bubble-recording 1.2s ease-in-out infinite;
}

@keyframes chat-bubble-recording {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 63, 63, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(212, 63, 63, 0);
        transform: scale(1.08);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 63, 63, 0);
        transform: scale(1);
    }
}

@keyframes chat-voice-recording {
    0% {
        box-shadow: 0 0 0 0 rgba(242, 91, 91, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 14px rgba(242, 91, 91, 0);
        transform: scale(1.09);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 63, 63, 0);
        transform: scale(1);
    }
}

@keyframes chat-voice-gradient {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes chat-voice-ripple {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    60% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes chat-voice-icon {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

/*==============================
=        REPLY PREVIEW        =
==============================*/

.reply-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    margin-right: 8px;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.reply-preview.hidden {
    display: none;
}

.reply-preview .cancel-reply {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1em;
}

.reply-to {
    font-size: 0.8em;
    background-color: rgba(0,0,0,0.3);
    border-left: 2px solid #ffaa33;
    padding: 2px 6px;
    margin-bottom: 4px;
    border-radius: 4px;
}

.reply-btn {
    cursor: pointer;
    font-size: 0.8em;
    color: #ccc;
    margin-left: 6px;
}

.reply-btn:hover {
    color: #fff;
}

/*==============================
=        STATUS BAR           =
==============================*/

.chat-status-bar {
    padding: 4px;
    background-color: #111;
    color: #999;
    font-size: 0.9em;
    border-bottom: 1px solid #555;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
}

.chat-status-bar .chat-status-modifier::before {
    content: ">";
    margin-right: 5px;
    color: #999;
}

.chat-status-bar .chat-status-modifier:first-child::before {
    content: "";
    margin-right: 0;
}

.chat-status-modifier.clickable {
    cursor: pointer;
}

/*==============================
=      TYPING INDICATOR       =
==============================*/

.typing-indicator {
    display: none;
    align-items: center;
    margin: 10px;
    gap: 6px;
}

.typing-indicator.typing-indicator--visible {
    display: flex;
}

.typing-indicator .dot {
    height: 10px;
    width: 10px;
    background-color: #d17218;
    border-radius: 50%;
    animation: typing-indicator-bounce 1.2s infinite ease-in-out;
    opacity: 0.25;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-indicator-bounce {
    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.25;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/*==============================
=        CONTEXT PANEL        =
==============================*/

.chat-context {
    display: flex;
    align-items: center;
    overflow-x: auto;
    gap: 10px;
    background-color: #111;
    border: 1px solid #555;
    border-radius: 5px;
    white-space: nowrap;
    margin-bottom: 10px;
    font-size: 0.9rem;
    min-height: 70px;
}

.chat-context.hidden {
    display: none;
}

#context-list {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

#context-list .object {
    display: inline-block;
    color: #fff;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

#context-list .object:hover {
    background-color: #bf620f;
    transform: scale(1.05);
}

.chat-context::-webkit-scrollbar {
    height: 8px;
}

.chat-context::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.chat-context::-webkit-scrollbar-thumb:hover {
    background-color: #777;
}

/*==============================
=        UNREAD BUBBLE        =
==============================*/

.chat-unread-badge {
    background-color: rgba(209, 114, 24, 1);
    color: white;
    font-size: 0.75em;
    font-weight: bold;
    padding: 4px 7px;
    border-radius: 999px;
    position: absolute;
    z-index: 2000;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    opacity: 1;
    top: 10px;
    right: 10px;
}

.chat-unread-popup {
    position: absolute;
    left: 80px;
    bottom: 80px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: white;
    padding: 10px;
    border-radius: 6px;
    z-index: 3001;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    min-width: 180px;
}

.chat-unread-popup.hidden {
    display: none;
}

.chat-unread-popup ul {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
}

.chat-unread-popup li {
    cursor: pointer;
    margin-bottom: 6px;
}

.chat-unread-popup li:hover {
    color: #ffaa33;
}

.chat-user-select.has-unread {
    border-color: #d17218;
    box-shadow: 0 0 4px #d17218;
}

/* WAI-Core: src/app/static/css/shell/chat/chat.css v5 (anonymous input block) */

#submit-name-form {
    background: linear-gradient(135deg, rgba(80,80,80,0.9), rgba(120,120,120,0.9));
    height: 100%;
    width: 100%;
}

#submit-name {
    padding: 16px;
    background-color: var(--brand-color-container-foreground-light);
    border-radius: 12px;
    border: 1px solid #333;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    margin: 10px;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#submit-name input[type="text"] {
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid #555;
    color: black;
    font-size: 1em;
    outline: none;
    transition: box-shadow 0.2s ease;
}

#submit-name input[type="text"]:focus {
    box-shadow: 0 0 8px #d17218;
    border-color: #d17218;
}

#submit-name button {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background-color: #d17218;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

#submit-name button:hover {
    background-color: #bf620f;
}

#submit-name label {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 4px;
    display: block;
    color: #ffaa33;
}

.chat-login-required {
    padding: 20px;
    text-align: center;
    color: #fff;
    background-color: var(--brand-color-container-background);
    border-radius: var(--brand-border-radius);
    margin: 20px;
}

.chat-login-required p {
    margin-bottom: 12px;
    font-size: 1.1em;
}

.chat-login-required a {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--brand-color-cta);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.chat-login-required a:hover {
    background-color: var(--brand-color-cta-hover);
}



.new-chat {
    background: none;
    border: none;
    color: white;
    font-size: 0.88em;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.new-chat:hover {
    color: #66ff66;
}


/* --- app/static/css/shell/chat/chat-responsive.css --- */
/* WAI-Core: src/app/static/css/shell/chat/chat-responsive.css v6 */

/*==============================
=        MEDIA QUERIES        =
==============================*/

@media (max-width: 900px) {

    .chat-unread-badge {
        top: 5px;
        right: 5px;
    }

}




/* Base mobile-first adjustments */
@media (max-width: 600px) {

    /* Chat Box Size */
    .chat-box.active {
        height: 90vh;
        width: 95vw;
        bottom: 5px;
        right: 5px;
    }

    /* Header Font and Padding */
    .chat-header {
        font-size: 1em;
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .chat-user-select,
    .chat-status-select {
        font-size: 0.85em;
        max-width: 140px;
    }

    .chat-tools-button,
    .clear-chat,
    .chat-close-button {
        font-size: 1em;
        padding: 2px;
    }

    /* Chat Footer Input Resize */
    .chat-input {
        font-size: 0.9em;
    }

    .chat-action-button {
        width: 38px;
        height: 38px;
    }

    .chat-action-icon {
        width: 18px;
        height: 18px;
    }

    /* Typing Indicator Margin */
    .typing-indicator {
        margin: 6px;
    }

    /* Status bar font */
    .chat-status-bar {
        font-size: 0.8em;
        padding: 4px 6px;
    }

    /* Tools popup size */
    #chat-tools-popup {
        font-size: 12px;
        max-width: 90vw;
        right: 10px;
        max-height: 70vh;
    }

    /* Unread popup spacing */
    .chat-unread-popup {
        bottom: 90px;
        left: 10px;
        font-size: 0.9em;
    }

    .chat-unread-popup li {
        margin-bottom: 5px;
    }
}

/* Additional rule for short screen heights */
@media (max-height: 500px) {
    .chat-box.active {
        height: 90vh;
        max-height: 90vh;
        bottom: 0;
    }
}


/* --- app/static/css/overrides/chat-reply.css --- */
/* WAI-Core: src/app/static/css/overrides/chat-reply.css v1 */
/* custom overrides for chat reply positioning */
.chat-footer {
    flex-wrap: wrap;
    align-items: center;
}
.reply-preview {
    width: 100%;
    margin-right: 0;
}


/* --- app/static/css/popup/base-popup.css --- */
/* WAI-Core: src/app/static/css/popup/base-popup.css v1 */

.right-panel-close {
    margin: 0px;
    padding: 0px;
    margin-right: 10px;
    margin-top: 4px;
}

.right-panel-content {
    background-color: var(--brand-color-container-foreground-dark);
}

#base-object-popup-container {
    width: 100%;
    height: 100%;
    border-radius: var(--brand-border-radius);
    color: #fff;
    overflow-y: auto;
}

/* Inner scrollable content area */
#base-object-content {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: 10px;
    margin-right: 10px;
    box-sizing: border-box;
}

/*
#page-object-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -3px;
    width: 6px;
    cursor: ew-resize;
    display: none;
}

#base-object-popup-container:hover #page-object-resize-handle {
    display: block;
}
*/


/* --- app/static/css/popup/base-popup-responsive.css --- */
/* WAI-Core: src/app/static/css/popup/base-popup-responsive.css v2 */


@media (max-width: 900px) {

    .toolbar-button {
        font-size: 0.64em;
        margin: 0px;
        padding: 2px;
    }

    #object-name {
        margin-bottom: 0px;
        font-size: 1rem;
    }

}

@media (max-width: 500px) {

    .attribute-label {
        min-width: 0px;
    }

    .popup-sections-scroll {
        padding-left: 2px;
        padding-right: 2px;
    }

    .attribute {
        grid-template-columns: 100px 1fr !important;
    }

}


/* --- app/static/css/popup/group-popup.css --- */
/* WAI-Core: src/app/static/css/popup/group-popup.css v2 */

#group-popup {
    position: absolute;
    width: 100%;
    color: #fff;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    z-index: 1010;
    flex-direction: column;
    height: 100%;
    display: none;
}

#group-popup:not(.group-popup-hidden) {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

#group-meta-data {
    margin-left: 10px;
    margin-right: 45px;
    background-color: var(--brand-foreground-dark);
    border-radius: var(--brand-border-radius);
}

#group-name {
    text-align: center;
    color: #fff;
}

#group-actions-toolbar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
}

.toolbar-group {
    display: flex;
    gap: 10px;
}

.toolbar-button {
    padding: 6px 12px;
    background-color: var(--brand-color-cta);
    border: 1px solid var(--brand-color-cta-hover);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    white-space: nowrap;
    position: relative;
}

.toolbar-button:hover {
    background-color: var(--brand-color-cta-hover);
    color: white;
}

.toolbar-button i {
    pointer-events: none;
}

.toolbar-button .button-label {
    display: none;
}

.toolbar-button:hover .button-label {
    display: none;
}

.toolbar-button::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    background-color: var(--brand-color-cta);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 6px;
    transition: opacity 0.2s ease;
}

.toolbar-button:hover::after {
    opacity: 1;
}

.toggle-section-button {
    background: none;
    border: none;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.property-item {
    margin-bottom: 5px;
    padding: 5px;
    border-bottom: 1px solid #444;
    word-wrap: break-word;
}

.property-item:last-child {
    border-bottom: none;
}


/* --- app/static/css/popup/object-popup.css --- */
/* WAI-Core: src/app/static/css/popup/object-popup.css v3 */

#object-popup {
    position: absolute;
    width: 100%;
    color: #fff;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    z-index: 1010;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#object-popup[data-visible="true"] {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

#object-meta-data {
    margin-left: 10px;
    background-color: var(--brand-foreground-dark);
    border-radius: var(--brand-border-radius);
}

#object-name {
    margin-bottom: 6px;
    text-align: center;
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-height: none;
}

#object-name.object-name-truncated {
    cursor: pointer;
    max-height: 1.2em;
}

#object-name.object-name-expanded {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
}

#clear-object-popup-recommendations {
    margin-left: 10px;
    margin-right: 20px;
    padding: 5px 10px;
    background: none;
    border: 1px solid yellow;
    color: rgba(255, 204, 0, 0.618);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 0px;
}

#clear-object-popup-recommendations:hover {
    background-color: rgba(255, 255, 0, 0.1);
}

#attributes-container {
    overflow-y: auto;
    max-height: 468px;
}

#object-popup h3 {
    margin-bottom: 0px;
}

#view-actions-toolbar,
#object-actions-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    align-items: center;
    justify-content: center;
}

.toolbar-group {
    display: flex;
    gap: 10px;
}

.toolbar-button {
    padding: 6px 12px;
    background-color: var(--brand-color-cta);
    border: 1px solid var(--brand-color-cta-hover);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    white-space: nowrap;
    position: relative;
}

.toolbar-button:hover {
    background-color: var(--brand-color-cta-hover);
    color: white;
}

.toolbar-button i {
    pointer-events: none;
}

.toolbar-button .button-label {
    display: none;
}

.toolbar-button:hover .button-label {
    display: none;
}

.toolbar-button::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    background-color: var(--brand-color-cta);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 6px;
    transition: opacity 0.2s ease;
}

.toolbar-button:hover::after {
    opacity: 1;
}

/* Hide sections that require contributor access */
body[data-contributor='false'] .contributor-only {
    display: none;
}


/* --- app/static/css/popup/sections/navigation.css --- */
/* WAI-Core: src/app/static/css/popup/sections/navigation.css v6 */

/* === Grid Layout === */
.nav-relationship-grid-2x3 {
    display: grid;
    grid-template-columns: 1fr 30px 1fr;
    grid-template-rows: auto;
    gap: 10px;
    padding: 10px 0;
}

.nav-row {
    display: contents;
}

.nav-cell {
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* === Left: Now Split into 3 Vertical Sections === */
.nav-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.nav-super > div:hover,
.nav-sub > div:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

/* === Current Object with Arrow === */
.nav-current {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.nav-current-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-arrow {
    font-size: 1.2em;
    color: var(--brand-color-primary);
    margin-left: -10px;
    margin-right: 4px;
}

/* === Right: Link Groups by Type === */
.nav-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    padding-left: 6px;
}

.nav-link-group {
    background-color: #222;
    border: 1px solid var(--brand-foreground-light);
    border-radius: 6px;
    padding: 6px 8px;
}

.nav-link-title {
    font-weight: bold;
    font-size: 0.64em;
    color: var(--brand-color-primary);
    margin-bottom: 4px;
}

.nav-link-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link-body > div {
    padding: 4px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-link-body > div:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* === Compact Support === */
#hierarchy-navigation.compact-model {
    font-size: 0.68rem;
    line-height: 1.3;
    padding: 4px 0;
}


/* --- app/static/css/popup/sections/collaboration.css --- */
/* WAI-Core: src/app/static/css/popup/sections/collaboration.css v1 */

.ai-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ai-progress .ai-icon {
    font-size: 0.96rem;
}

.ai-progress .ai-message {
    background: #c00;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
}

.ai-cancel-button {
    margin-top: 0.5rem;
}

.user-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.user-progress .user-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #666;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    overflow: hidden;
}

.user-progress .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-progress .user-message {
    background: #c00;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
}


/* --- app/static/css/cookie/cookie.css --- */
/* WAI-Core: src/app/static/css/cookie/cookie.css v1 */

/* Website: src/app/static/css/cookie/cookie.css v1.0 */
/* Website: Website/src/app/static/css/cookie/cookie.css v1.0 */
/* More specific class targeting to prevent conflicts */

/* CSS for the container */
.cookie-banner-container {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    /* Ensure banner stays above the footer */
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px; /* Consistent padding */
    height: 80px; /* Consistent height for the banner */
    font-family: 'Roboto', Arial, sans-serif; /* Define font family */
    font-size: 14px; /* Define consistent font size */
}

/* CSS for the banner */
.cookie-banner-container .cookie-banner {
    background-color: #fff !important; /* Ensure background color is not overridden */
    border-radius: 4px;
    padding: 10px 20px; /* Consistent padding inside the banner */
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 80%; /* Consistent width for the banner */
    max-width: 1200px; /* Max width to ensure the banner doesn't get too wide on larger screens */
    font-size: 14px; /* Set font size */
    font-family: 'Roboto', Arial, sans-serif; /* Define font family */
}

#cookie-banner {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* Content inside the banner */
.cookie-banner-container .cookie-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Text inside the banner */
.cookie-banner-container .cookie-text {
    font-size: 14px !important; /* Ensure consistent text size */
    margin: 0;
    flex: 1;
    color: #333 !important; /* Ensure consistent text color */
    max-width: 70%; /* Ensure text takes up a consistent amount of space */
    line-height: 1.5; /* Ensure readability */
    font-family: 'Roboto', Arial, sans-serif; /* Define font family */
}

/* Buttons inside the banner */
.cookie-banner-container .cookie-buttons {
    display: flex;
    align-items: center;
    margin-left: 15px;
    min-width: 200px; /* Ensure consistent space for buttons */
}

/* Button styling */
.cookie-banner-container .cookie-button {
    padding: 8px 16px !important; /* Consistent padding for all buttons */
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px !important; /* Set consistent font size */
    width: 100px; /* Consistent button width */
    font-family: 'Roboto', Arial, sans-serif; /* Define font family */
}

/* Settings link inside the banner */
.cookie-banner-container .cookie-link.settings-link {
    text-decoration: none;
    color: #0a5bd8 !important;
    font-weight: bold;
    font-size: 14px !important; /* Consistent font size */
    margin-left: 5px;
    width: auto; /* Ensure the link adjusts based on text size */
    height: 40px; /* Consistent height for the link */
    display: flex;
    align-items: center; /* Vertically center the text */
    font-family: 'Roboto', Arial, sans-serif; /* Define font family */
}

/* Settings link hover effect */
.cookie-banner-container .cookie-link.settings-link:hover {
    text-decoration: underline !important;
    color: #084a9c !important;
}

.cookie-banner-container .cookie-link.settings-link:focus-visible {
    outline: 2px solid #0b1014;
    outline-offset: 2px;
    text-decoration: underline;
    color: #084a9c !important;
}

.cookie-banner-container .cookie-link.settings-link:active {
    color: #06397a !important;
}

/* Responsive styles */
@media (max-width: 600px) {
    .cookie-banner-container {
        height: auto;
        padding: 15px;
    }

    .cookie-banner-container .cookie-banner {
        flex-direction: column;
        width: 95%;
        height: auto;
        padding: 15px;
    }

    .cookie-banner-container .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-container .cookie-text {
        max-width: 100%;
        text-align: left;
        margin-bottom: 10px;
    }

    .cookie-banner-container .cookie-buttons {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .cookie-banner-container .cookie-button {
        width: auto;
        margin-bottom: 10px;
    }

    .cookie-banner-container .cookie-link.settings-link {
        height: auto;
    }
}
