Files
goose-highlighter/popup/popup.css

875 lines
15 KiB
CSS

:root {
--bg-color: #0f0f0f;
--text-color: #e8e8e8;
--input-bg: #1c1c1c;
--input-border: #2d2d2d;
--button-bg: #252525;
--button-hover: #333333;
--button-text: #e8e8e8;
--accent: #ec9c23;
--accent-hover: #ffb84d;
--accent-text: #000;
--highlight-tag: #222222;
--highlight-tag-border: #3a3a3a;
--danger: #ef4444;
--success: #10b981;
--shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
--border-radius: 10px;
--section-bg: #161616;
--switch-bg: #3a3a3a;
--checkbox-accent: #ec9c23;
--checkbox-border: #4a4a4a;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: var(--bg-color);
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;
}
/* 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);
}
}
body.light {
--bg-color: #f8f9fa;
--text-color: #1a1a1a;
--input-bg: #ffffff;
--input-border: #e0e0e0;
--button-bg: #f0f0f0;
--button-hover: #e5e5e5;
--button-text: #1a1a1a;
--accent: #ec9c23;
--accent-text: #000;
--highlight-tag: #f5f5f5;
--highlight-tag-border: #e0e0e0;
--danger: #ef4444;
--success: #10b981;
--shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
--section-bg: #ffffff;
--switch-bg: #d1d5db;
--checkbox-accent: #ec9c23;
--checkbox-border: #9ca3af;
}
.container {
padding: 12px;
display: flex;
flex-direction: column;
gap: 8px;
flex: 1;
overflow: hidden;
min-height: 0;
}
/* Tabs */
.tabs {
display: flex;
gap: 4px;
border-bottom: 2px solid var(--input-border);
margin-bottom: 8px;
}
.tab-button {
flex: 1;
background: transparent;
border: none;
border-bottom: 2px solid transparent;
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: -2px;
transition: all 0.2s;
}
.tab-button:hover {
opacity: 0.9;
background: var(--highlight-tag);
}
.tab-button.active {
opacity: 1;
border-bottom-color: var(--accent);
color: var(--accent);
}
.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: 10px 12px;
background: linear-gradient(135deg, var(--section-bg) 0%, var(--input-bg) 100%);
border-radius: 8px;
border: 1px solid var(--input-border);
color: var(--text-color);
font-weight: 600;
font-size: 0.95em;
margin-bottom: 0;
box-shadow: var(--shadow-sm);
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;
}
.icon-toggle {
cursor: pointer;
font-size: 16px;
color: var(--accent);
display: flex;
align-items: center;
padding: 4px;
border-radius: 4px;
}
.icon-toggle:hover {
color: var(--accent-hover);
background: var(--highlight-tag);
}
.hidden-toggle {
display: none;
}
/* GLOBAL HIGHLIGHT ICON: toggle-on/off */
.global-icon::before {
content: "\f204";
}
#globalHighlightToggle:checked+.global-icon::before {
content: "\f205";
}
/* THEME ICON: sun/moon - NO CHECKMARKS */
.theme-icon::before {
content: "\f185";
}
#themeToggle:checked+.theme-icon::before {
content: "\f186";
}
.toggle-icon {
font-family: "Font Awesome 6 Free";
font-weight: 900;
}
/* Sections */
.section {
background: var(--section-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
padding: 10px;
box-shadow: var(--shadow-sm);
display: flex;
flex-direction: column;
}
.section:hover {
box-shadow: var(--shadow);
}
.section[data-section="wordlist"] {
flex: 1;
overflow: hidden;
min-height: 0;
}
.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;
}
/* Form Elements */
input[type="text"],
textarea,
select {
width: 100%;
padding: 6px 8px;
border-radius: 6px;
border: 1px solid var(--input-border);
background-color: var(--input-bg);
color: var(--text-color);
font-size: 0.85em;
box-sizing: border-box;
margin-top: 4px;
margin-bottom: 6px;
font-family: inherit;
}
input[type="text"]:focus,
textarea:focus,
select:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(236, 156, 35, 0.1);
}
textarea {
resize: none;
height: 50px;
font-size: 0.85em;
line-height: 1.4;
font-family: inherit;
}
/* Color Inputs */
input[type="color"] {
background: none;
border: 1.5px solid var(--input-border);
border-radius: 6px;
box-shadow: var(--shadow-sm);
width: 24px;
height: 24px;
margin-left: 6px;
cursor: pointer;
padding: 0;
appearance: none;
-webkit-appearance: none;
overflow: hidden;
}
input[type="color"]:hover {
border-color: var(--accent);
}
input[type="color"]::-webkit-color-swatch-wrapper {
padding: 0;
border-radius: 0;
}
input[type="color"]::-webkit-color-swatch {
border-radius: 0;
border: none;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
input[type="color"]::-moz-color-swatch {
border-radius: 0;
border: none;
padding: 0;
width: 100%;
height: 100%;
}
.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;
}
/* Checkboxes */
input[type="checkbox"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: var(--input-bg);
border: 1.5px solid var(--checkbox-border);
border-radius: 3px;
width: 16px;
height: 16px;
cursor: pointer;
position: relative;
flex-shrink: 0;
}
input[type="checkbox"]:hover {
border-color: var(--accent);
}
input[type="checkbox"]:checked {
background-color: var(--accent);
border-color: var(--accent);
}
input[type="checkbox"]:checked::before {
content: "✓";
position: absolute;
top: -3px;
left: 2px;
color: white;
font-size: 12px;
font-weight: bold;
}
/* Switch Toggle */
input[type="checkbox"].switch {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 36px;
height: 20px;
background: var(--switch-bg);
border: none;
border-radius: 20px;
position: relative;
outline: none;
cursor: pointer;
transition: background 0.2s;
}
input[type="checkbox"].switch::before {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
background: white;
border-radius: 50%;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
transition: left 0.2s;
}
input[type="checkbox"].switch:checked {
background: var(--accent);
}
input[type="checkbox"].switch:checked::before {
left: 18px;
}
input[type="checkbox"].switch:hover {
opacity: 0.9;
}
input[type="checkbox"].switch::after {
content: none !important;
}
label:has(input.switch) {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
padding: 4px 0;
}
/* Buttons */
button {
background: var(--button-bg);
color: var(--button-text);
border: 1px solid var(--input-border);
padding: 6px 10px;
border-radius: 6px;
font-weight: 500;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 5px;
font-size: 0.8em;
font-family: inherit;
white-space: nowrap;
line-height: 1.2;
}
button i {
display: flex;
align-items: center;
font-size: 0.95em;
}
button:hover {
background: var(--button-hover);
}
button.danger {
background: var(--danger);
color: white !important;
border-color: var(--danger);
}
button.danger:hover {
background: #dc2626;
border-color: #dc2626;
}
.button-row {
display: flex;
gap: 6px;
flex-wrap: wrap;
margin-top: 6px;
margin-bottom: 8px;
align-items: center;
}
.button-row button {
flex-shrink: 0;
}
.button-row label {
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
font-size: 0.8em;
padding: 4px 8px;
border-radius: 4px;
}
.button-row label:hover {
background: var(--highlight-tag);
}
.button-row input[type="checkbox"] {
margin: 0;
vertical-align: middle;
}
input[type="file"] {
display: none;
}
/* Word List */
#wordSearch {
width: 100%;
margin-bottom: 6px;
margin-top: 6px;
}
#wordList {
margin-top: 6px;
position: relative;
overflow-y: auto;
overflow-x: hidden;
flex: 1;
min-height: 0;
border: 1px solid var(--input-border);
border-radius: 6px;
background: var(--section-bg);
padding: 4px;
}
#wordList .word-item {
width: calc(100% - 8px);
left: 4px;
height: 32px;
display: grid;
grid-template-columns: 18px 1fr 26px 26px;
align-items: center;
gap: 6px;
padding: 4px 6px;
box-sizing: border-box;
border-radius: 4px;
background: var(--input-bg);
border: 1px solid var(--input-border);
transition: all 0.2s;
}
#wordList .word-item:hover {
background: var(--highlight-tag);
border-color: var(--accent);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
#wordList .word-item.disabled {
opacity: 0.5;
background: var(--section-bg);
}
#wordList .word-item.disabled:hover {
opacity: 0.65;
}
#wordList .word-item.disabled input[type="text"] {
color: var(--text-color) !important;
opacity: 0.6;
text-decoration: line-through;
}
#wordList input[type="text"] {
min-width: 0;
width: 100%;
background-color: var(--section-bg) !important;
color: var(--text-color) !important;
border: 1px solid var(--input-border) !important;
padding: 4px 6px;
border-radius: 3px;
font-size: 0.8em;
transition: border-color 0.2s;
margin: 0;
}
#wordList input[type="text"]:focus {
border-color: var(--accent) !important;
outline: none;
}
#wordList input[type="color"] {
width: 22px;
height: 22px;
padding: 0;
border-radius: 3px;
border: 1px solid var(--input-border);
cursor: pointer;
transition: border-color 0.2s;
align-self: center;
}
#wordList input[type="color"]:hover {
border-color: var(--accent);
}
#wordList input[type="checkbox"] {
margin: 0;
width: 16px;
height: 16px;
}
#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: 6px;
background: var(--input-bg);
min-height: 0;
}
.exception-item {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
padding: 6px 10px;
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(--input-border);
background: var(--section-bg);
flex-shrink: 0;
}
.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;
}
.github-link:hover {
opacity: 1;
color: var(--accent);
background: var(--highlight-tag);
}
/* Scrollbars */
html,
body,
#wordList,
.exceptions-list {
scrollbar-width: thin;
scrollbar-color: var(--accent) var(--section-bg);
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
#wordList::-webkit-scrollbar,
.exceptions-list::-webkit-scrollbar {
width: 8px;
background: var(--section-bg);
border-radius: 8px;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
#wordList::-webkit-scrollbar-thumb,
.exceptions-list::-webkit-scrollbar-thumb {
background: var(--accent);
border-radius: 8px;
min-height: 24px;
border: 2px solid var(--section-bg);
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
#wordList::-webkit-scrollbar-thumb:hover,
.exceptions-list::-webkit-scrollbar-thumb:hover {
background: var(--accent-hover);
}
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
#wordList::-webkit-scrollbar-corner,
.exceptions-list::-webkit-scrollbar-corner {
background: var(--section-bg);
}
/* Page Highlights Section */
.section[data-section="page-highlights"] {
flex: 1;
overflow: hidden;
min-height: 0;
}
.page-highlights-info {
font-size: 0.85em;
padding: 6px 8px;
background: var(--input-bg);
border-radius: 6px;
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: 6px;
background: var(--input-bg);
min-height: 0;
}
.page-highlight-item {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
padding: 8px 10px;
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: 7px;
}
.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;
}