/* vue-advanced-chat overrides for Google Chat Local */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Google Sans Text', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: #202124;
    overflow: hidden;
}

#chat-app-container {
    width: 100%;
    height: calc(100vh - 48px);
    position: relative;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toastIn 0.3s ease;
    max-width: 400px;
}

.toast.toast-error { background: #d93025; }
.toast.toast-success { background: #1e8e3e; }
.toast.toast-info { background: #1a73e8; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Notification sound toggle button */
.notif-sound-toggle {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 100;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #5f6368;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.notif-sound-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #202124;
}

.notif-sound-toggle:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.notif-sound-toggle svg {
    display: block;
}

/* Dark mode overrides */
[data-theme="dark"] body {
    background: #1a1a1a;
    color: #e8eaed;
}

[data-theme="dark"] .notif-sound-toggle {
    color: #9aa0a6;
}

[data-theme="dark"] .notif-sound-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e8eaed;
}

/* =========================================================================
   KEYBOARD NAVIGATION
   ========================================================================= */

/* Keyboard-selected message highlight (applied to shadow DOM elements) */
.keyboard-selected {
    outline: 2px solid #1a73e8 !important;
    outline-offset: -2px;
    border-radius: 8px;
}

[data-theme="dark"] .keyboard-selected {
    outline-color: #8ab4f8 !important;
}

/* Keyboard shortcuts help overlay */
.keyboard-shortcuts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.keyboard-shortcuts-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.keyboard-shortcuts-dialog {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.keyboard-shortcuts-overlay.visible .keyboard-shortcuts-dialog {
    transform: scale(1);
}

.keyboard-shortcuts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.keyboard-shortcuts-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.keyboard-shortcuts-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #5f6368;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.15s ease;
}

.keyboard-shortcuts-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.keyboard-shortcuts-body {
    padding: 12px 20px 20px;
}

.keyboard-shortcuts-section {
    margin-bottom: 16px;
}

.keyboard-shortcuts-section:last-child {
    margin-bottom: 0;
}

.keyboard-shortcuts-section h4 {
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.keyboard-shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #3c4043;
}

.keyboard-shortcut-row kbd {
    display: inline-block;
    min-width: 24px;
    padding: 2px 6px;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-family: 'Roboto Mono', 'Menlo', monospace;
    font-size: 12px;
    color: #202124;
    text-align: center;
    line-height: 18px;
    margin-right: 4px;
}

.keyboard-shortcut-row span {
    flex: 1;
    text-align: right;
    color: #5f6368;
}

/* Dark mode for shortcuts overlay */
[data-theme="dark"] .keyboard-shortcuts-dialog {
    background: #2d2d2d;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .keyboard-shortcuts-header {
    border-bottom-color: #444;
}

[data-theme="dark"] .keyboard-shortcuts-header h3 {
    color: #e8eaed;
}

[data-theme="dark"] .keyboard-shortcuts-close {
    color: #9aa0a6;
}

[data-theme="dark"] .keyboard-shortcuts-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .keyboard-shortcuts-section h4 {
    color: #9aa0a6;
}

[data-theme="dark"] .keyboard-shortcut-row {
    color: #bdc1c6;
}

[data-theme="dark"] .keyboard-shortcut-row kbd {
    background: #3c4043;
    border-color: #5f6368;
    color: #e8eaed;
}

[data-theme="dark"] .keyboard-shortcut-row span {
    color: #9aa0a6;
}
