mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-08 20:19:06 +03:00
723 lines
12 KiB
CSS
723 lines
12 KiB
CSS
@import url('../shared/colors.css');
|
|
@import url('../shared/ui-components.css');
|
|
|
|
body {
|
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
background: radial-gradient(120% 120% at 12% 0%, rgba(204, 106, 42, 0.08) 0%, transparent 45%),
|
|
linear-gradient(180deg, var(--bg-color) 0%, #f4e9df 100%);
|
|
color: var(--text-color);
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 360px;
|
|
height: 600px;
|
|
overflow: hidden;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
html.dark body,
|
|
body.dark {
|
|
background: radial-gradient(120% 120% at 10% 0%, rgba(242, 168, 101, 0.08) 0%, transparent 45%),
|
|
linear-gradient(180deg, var(--bg-color) 0%, #0f0d0b 100%);
|
|
}
|
|
|
|
/* Loading Overlay */
|
|
.loading-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: var(--bg-color);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 9999;
|
|
transition: opacity 0.2s ease-out;
|
|
}
|
|
|
|
.loading-overlay.hidden {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.loading-spinner {
|
|
width: 32px;
|
|
height: 32px;
|
|
border: 3px solid var(--input-border);
|
|
border-top-color: var(--accent);
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
.container {
|
|
padding: 14px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* Tabs */
|
|
.tabs {
|
|
display: flex;
|
|
gap: 6px;
|
|
padding: 6px;
|
|
border-radius: 12px;
|
|
background: var(--section-bg);
|
|
border: 1px solid var(--input-border);
|
|
box-shadow: var(--shadow-sm);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.tab-button {
|
|
flex: 1;
|
|
background: transparent;
|
|
border: 1px solid transparent;
|
|
border-bottom: none;
|
|
padding: 8px 6px;
|
|
font-size: 0.75em;
|
|
font-weight: 500;
|
|
color: var(--text-color);
|
|
opacity: 0.6;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
margin-bottom: 0;
|
|
transition: all 0.2s;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.tab-button:hover {
|
|
opacity: 0.9;
|
|
background: var(--highlight-tag);
|
|
}
|
|
|
|
.tab-button.active {
|
|
opacity: 1;
|
|
background: var(--accent);
|
|
color: var(--accent-text);
|
|
border-color: transparent;
|
|
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.tab-button i {
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.tab-content {
|
|
display: none;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
.tab-content.active {
|
|
display: flex;
|
|
}
|
|
|
|
/* Header */
|
|
.header-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 12px 14px;
|
|
background: linear-gradient(145deg, var(--section-bg) 0%, var(--input-bg) 100%);
|
|
border-radius: 14px;
|
|
border: 1px solid var(--highlight-tag-border);
|
|
color: var(--text-color);
|
|
font-weight: 600;
|
|
font-size: 0.95em;
|
|
margin-bottom: 0;
|
|
box-shadow: var(--shadow);
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.header-bar .title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.header-bar .title i {
|
|
color: var(--accent);
|
|
font-size: 1em;
|
|
}
|
|
|
|
.icon-toggles {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
/* GLOBAL HIGHLIGHT ICON: toggle-on/off */
|
|
.global-icon::before {
|
|
content: "\f204";
|
|
}
|
|
|
|
#globalHighlightToggle:checked+.global-icon::before {
|
|
content: "\f205";
|
|
}
|
|
|
|
/* Sections */
|
|
.section {
|
|
background: var(--section-bg);
|
|
border: 1px solid var(--highlight-tag-border);
|
|
border-radius: 14px;
|
|
padding: 12px;
|
|
box-shadow: var(--shadow);
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.section:hover {
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.section[data-section="wordlist"] {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
display: grid;
|
|
grid-template-rows: auto auto auto 1fr auto;
|
|
row-gap: 6px;
|
|
}
|
|
|
|
.selection-hint {
|
|
font-size: 0.7em;
|
|
opacity: 0.6;
|
|
text-align: center;
|
|
font-style: italic;
|
|
padding: 4px 0 0 0;
|
|
}
|
|
|
|
.section[data-section="addwords"] textarea {
|
|
height: 44px;
|
|
}
|
|
|
|
.section h3 {
|
|
font-size: 0.85em;
|
|
margin: 0 0 8px 0;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
letter-spacing: -0.01em;
|
|
color: var(--text-color);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
input[type="text"],
|
|
textarea,
|
|
select {
|
|
margin-top: 4px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
textarea {
|
|
resize: none;
|
|
height: 60px;
|
|
}
|
|
|
|
input[type="color"] {
|
|
box-shadow: var(--shadow-sm);
|
|
width: 24px;
|
|
height: 24px;
|
|
margin-left: 6px;
|
|
}
|
|
|
|
.color-row {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: center;
|
|
margin-bottom: 8px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.color-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
font-size: 0.8em;
|
|
font-weight: 500;
|
|
}
|
|
|
|
|
|
|
|
button {
|
|
padding: 8px 12px;
|
|
font-size: 0.8em;
|
|
}
|
|
|
|
.button-row {
|
|
display: flex;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
margin-top: 6px;
|
|
margin-bottom: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
.section[data-section="wordlist"] .button-row {
|
|
flex-wrap: wrap;
|
|
overflow: visible;
|
|
gap: 4px;
|
|
margin: 0;
|
|
}
|
|
|
|
.section[data-section="wordlist"] .button-row button {
|
|
padding: 6px 8px;
|
|
font-size: 0.72em;
|
|
}
|
|
|
|
.button-row button {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.button-row label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
cursor: pointer;
|
|
font-size: 0.8em;
|
|
padding: 6px 10px;
|
|
border-radius: 999px;
|
|
border: 1px solid var(--input-border);
|
|
background: var(--input-bg);
|
|
}
|
|
|
|
.button-row label:hover {
|
|
background: var(--highlight-tag);
|
|
border-color: var(--highlight-tag-border);
|
|
}
|
|
|
|
.button-row input[type="checkbox"] {
|
|
margin: 0;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
input[type="file"] {
|
|
display: none;
|
|
}
|
|
|
|
/* Word List */
|
|
#wordSearch {
|
|
width: 100%;
|
|
margin: 0;
|
|
}
|
|
|
|
#wordList {
|
|
margin-top: 6px;
|
|
position: relative;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
height: 100%;
|
|
max-height: 100%;
|
|
box-sizing: border-box;
|
|
border: 1px solid var(--input-border);
|
|
border-radius: 12px;
|
|
background: var(--section-bg);
|
|
padding: 6px;
|
|
}
|
|
|
|
#wordList .word-item {
|
|
width: calc(100% - 8px);
|
|
left: 4px;
|
|
height: 34px;
|
|
display: grid;
|
|
grid-template-columns: 1fr auto auto auto auto;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 6px 8px;
|
|
box-sizing: border-box;
|
|
border-radius: 8px;
|
|
background: var(--input-bg);
|
|
border: 2px solid transparent;
|
|
transition: all 0.2s;
|
|
cursor: pointer;
|
|
}
|
|
|
|
#wordList .word-item:hover {
|
|
background: var(--highlight-tag);
|
|
border-color: rgba(242, 168, 101, 0.3);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
#wordList .word-item.selected {
|
|
background: rgba(242, 168, 101, 0.15);
|
|
border-color: rgba(242, 168, 101, 0.6);
|
|
}
|
|
|
|
#wordList .word-item.disabled {
|
|
opacity: 0.5;
|
|
background: var(--section-bg);
|
|
}
|
|
|
|
#wordList .word-item.disabled:hover {
|
|
opacity: 0.65;
|
|
}
|
|
|
|
#wordList .word-item.disabled .word-text {
|
|
text-decoration: line-through;
|
|
}
|
|
|
|
#wordList .word-text {
|
|
font-size: 0.8em;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
user-select: none;
|
|
min-width: 0;
|
|
}
|
|
|
|
#wordList .word-text.editing {
|
|
display: none;
|
|
}
|
|
|
|
#wordList .word-edit-input {
|
|
display: none;
|
|
min-width: 0;
|
|
width: 100%;
|
|
background-color: var(--section-bg) !important;
|
|
color: var(--text-color) !important;
|
|
border: 1px solid var(--accent) !important;
|
|
padding: 4px 6px;
|
|
border-radius: 6px;
|
|
font-size: 0.8em;
|
|
transition: border-color 0.2s;
|
|
margin: 0;
|
|
}
|
|
|
|
#wordList .word-edit-input.active {
|
|
display: block;
|
|
}
|
|
|
|
#wordList .word-edit-input:focus {
|
|
border-color: var(--accent) !important;
|
|
outline: none;
|
|
}
|
|
|
|
#wordList .word-actions {
|
|
display: flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
#wordList .word-actions > * {
|
|
pointer-events: auto;
|
|
}
|
|
|
|
#wordList .icon-btn {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-color);
|
|
opacity: 0.6;
|
|
cursor: pointer;
|
|
padding: 3px 5px;
|
|
border-radius: 4px;
|
|
transition: all 0.2s ease;
|
|
font-size: 0.75em;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 22px;
|
|
min-height: 22px;
|
|
}
|
|
|
|
#wordList .icon-btn:hover {
|
|
opacity: 1;
|
|
background: rgba(242, 168, 101, 0.15);
|
|
color: var(--accent);
|
|
}
|
|
|
|
#wordList .icon-btn i {
|
|
pointer-events: none;
|
|
}
|
|
|
|
#wordList .toggle-btn {
|
|
width: 32px;
|
|
height: 18px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border: 1px solid var(--input-border);
|
|
border-radius: 9px;
|
|
position: relative;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
padding: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#wordList .toggle-btn::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 12px;
|
|
height: 12px;
|
|
background: var(--text-color);
|
|
border-radius: 50%;
|
|
top: 2px;
|
|
left: 2px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
#wordList .toggle-btn.active {
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
#wordList .toggle-btn.active::after {
|
|
left: 16px;
|
|
background: var(--accent-text);
|
|
}
|
|
|
|
#wordList input[type="color"] {
|
|
width: 22px;
|
|
height: 22px;
|
|
padding: 0;
|
|
border-radius: 3px;
|
|
border: 1px solid var(--input-border);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
align-self: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#wordList input[type="color"]:hover {
|
|
border-color: var(--accent);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
#wordCount {
|
|
font-weight: normal;
|
|
margin-left: -8px;
|
|
margin-right: -8px;
|
|
}
|
|
|
|
/* Exception Panel */
|
|
.section[data-section="exceptions"] {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
.exceptions-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
margin: 8px 0;
|
|
border: 1px solid var(--input-border);
|
|
border-radius: 12px;
|
|
background: var(--input-bg);
|
|
min-height: 0;
|
|
}
|
|
|
|
.exception-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 8px 12px;
|
|
border-bottom: none;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.exception-item:nth-child(odd) {
|
|
background: var(--section-bg);
|
|
}
|
|
|
|
.exception-item:nth-child(even) {
|
|
background: var(--input-bg);
|
|
}
|
|
|
|
.exception-item:hover {
|
|
background: var(--highlight-tag) !important;
|
|
}
|
|
|
|
.exception-domain {
|
|
flex: 1;
|
|
word-break: break-word;
|
|
font-family: inherit;
|
|
font-size: 1em;
|
|
line-height: 1.4;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.exception-remove {
|
|
background: var(--danger);
|
|
color: white;
|
|
border: none;
|
|
padding: 4px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.75em;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.exception-remove:hover {
|
|
background: #dc2626;
|
|
}
|
|
|
|
/* Footer */
|
|
.footer {
|
|
padding: 10px 12px;
|
|
border-top: 1px solid var(--highlight-tag-border);
|
|
background: var(--section-bg);
|
|
flex-shrink: 0;
|
|
box-shadow: 0 -6px 14px rgba(0, 0, 0, 0.12);
|
|
}
|
|
|
|
.footer-content {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-size: 0.75em;
|
|
color: var(--text-color);
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.version {
|
|
font-weight: 500;
|
|
font-family: 'Courier New', monospace;
|
|
}
|
|
|
|
.github-link {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
color: var(--text-color);
|
|
text-decoration: none;
|
|
padding: 3px 6px;
|
|
border-radius: 4px;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.github-link:hover {
|
|
opacity: 1;
|
|
color: var(--accent);
|
|
background: var(--highlight-tag);
|
|
border-color: var(--highlight-tag-border);
|
|
}
|
|
|
|
|
|
|
|
/* Page Highlights Section */
|
|
.section[data-section="page-highlights"] {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
.page-highlights-info {
|
|
font-size: 0.85em;
|
|
padding: 8px 10px;
|
|
background: var(--input-bg);
|
|
border-radius: 10px;
|
|
border: 1px solid var(--input-border);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.page-highlights-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
margin-top: 8px;
|
|
border: 1px solid var(--input-border);
|
|
border-radius: 12px;
|
|
background: var(--input-bg);
|
|
min-height: 0;
|
|
}
|
|
|
|
.page-highlight-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 12px;
|
|
border-bottom: 1px solid var(--input-border);
|
|
font-size: 0.85em;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.page-highlight-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.page-highlight-item:hover {
|
|
background: var(--highlight-tag);
|
|
border-left: 3px solid var(--accent);
|
|
padding-left: 9px;
|
|
}
|
|
|
|
.page-highlight-word {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
word-break: break-word;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.page-highlight-preview {
|
|
display: inline-block;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.page-highlight-count {
|
|
background: var(--accent);
|
|
color: var(--accent-text);
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
font-size: 0.75em;
|
|
font-weight: 600;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.page-highlight-nav {
|
|
display: flex;
|
|
gap: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.page-highlight-nav button {
|
|
padding: 4px 8px;
|
|
font-size: 0.75em;
|
|
min-width: 28px;
|
|
}
|
|
|
|
.page-highlight-position {
|
|
font-size: 0.7em;
|
|
color: var(--text-color);
|
|
opacity: 0.6;
|
|
margin-left: 4px;
|
|
}
|
|
|
|
.page-highlights-empty {
|
|
padding: 20px;
|
|
text-align: center;
|
|
color: var(--text-color);
|
|
opacity: 0.5;
|
|
font-size: 0.85em;
|
|
}
|