html, body {
    height: 100%;
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    font-size: 13px;
}

#app {
    height: 100%;
}

.layout {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-bottom: 1px solid #d0d0d0;
    background: #f5f5f5;
}

.tabs {
    flex-wrap: wrap;
    gap: 2px;
}

.tab {
    border: 1px solid #c0c0c0;
    border-radius: 3px 3px 0 0;
    background: #e8e8e8;
    padding: 4px 10px;
    cursor: pointer;
}

.tab.active {
    background: #ffffff;
    border-bottom-color: #ffffff;
    font-weight: 600;
}

.toolbar .quick {
    width: 280px;
    padding: 3px 6px;
}

.chk {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

#grid-host {
    flex: 1 1 auto;
    min-height: 0;
}

.status {
    border-bottom: none;
    border-top: 1px solid #d0d0d0;
    font-family: Consolas, monospace;
    font-size: 12px;
    white-space: nowrap;
    overflow-x: auto;
}

/* Spell-check squiggle — same idiom the real app would use.
   skip-ink:none keeps the wavy line continuous under descenders (g/j/p/y);
   the Chromium default punches gaps into it. */
.miss {
    text-decoration: underline wavy #d11a1a 1px;
    text-underline-offset: 3px;
    text-decoration-skip-ink: none;
}

/* Top-align all cells: fixed line-height instead of the theme's row-height centering. */
#grid-host .ag-cell {
    line-height: 20px !important;
    padding-top: 3px;
    padding-bottom: 3px;
}

/* Long-text columns: wrap and let the row grow (autoHeight is set on the column). */
#grid-host .wrap-cell {
    white-space: normal;
    word-break: break-word;
}

#grid-host .wrap-content {
    white-space: inherit;
}

/* Review-state cell backgrounds — Google Sheets light palette. */
#grid-host .needs-tr { background-color: #D9D2E9; }  /* EN cell, needs translation */
#grid-host .st-rev   { background-color: #FFF2CC; }  /* SK reviewed */
#grid-host .st-ai    { background-color: #CFE2F3; }  /* SK AI-reviewed */
#grid-host .st-ver   { background-color: #D9EAD3; }  /* SK verified in-game */

/* AI-review widget (accept/reject a pending suggestion). */
.ai-actions {
    display: flex;
    gap: 4px;
    align-items: flex-start;
    padding-top: 1px;
}

.ai-actions button {
    border: 1px solid #b0b0b0;
    border-radius: 3px;
    background: #fafafa;
    padding: 0 8px;
    line-height: 18px;
    cursor: pointer;
}

.ai-actions button:hover {
    background: #e8f0fe;
}

/* Live spell-check editor (SK column). */
.spell-editor {
    box-sizing: border-box;
    width: 100%;
    min-height: 100%;
    padding: 3px 6px;
    background: #fff;
    border: 2px solid #2a6fd6;
    border-radius: 2px;
    outline: none;
    font: inherit;
    line-height: 20px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-y: auto;
}

.spell-editor.popup {
    width: 640px;
    min-height: 140px;
    max-height: 60vh;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
