Files
goose-highlighter/popup/popup.css
2026-02-05 16:49:00 +03:00

1290 lines
21 KiB
CSS

@import url('../shared/colors.css');
/* Reset and Base Styles */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
background: var(--bg-color);
color: var(--text-color);
width: 600px;
min-height: 600px;
max-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);
}
}
/* Main Container */
.popup-container {
display: flex;
flex-direction: column;
flex: 1;
background: var(--bg-color);
overflow: hidden;
min-height: 0;
}
/* Header */
.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid var(--input-border);
background: var(--bg-color);
flex-shrink: 0;
}
.header-content {
display: flex;
align-items: center;
gap: 10px;
}
.header-logo {
width: 32px;
height: 32px;
border-radius: 8px;
background: var(--highlight-tag);
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
}
.header-logo img {
width: 100%;
height: 100%;
object-fit: contain;
}
.header-title {
font-size: 14px;
font-weight: 600;
color: var(--text-color);
}
/* Switch Component */
.switch-wrapper {
position: relative;
display: inline-block;
width: 44px;
height: 24px;
cursor: pointer;
}
.switch-input {
opacity: 0;
width: 0;
height: 0;
position: absolute;
}
.switch-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--input-border);
transition: 0.3s;
border-radius: 24px;
}
.switch-slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background-color: white;
transition: 0.3s;
border-radius: 50%;
}
.switch-input:checked + .switch-slider {
background-color: var(--accent);
}
.switch-input:checked + .switch-slider:before {
transform: translateX(20px);
}
/* Tabs */
.tabs {
display: flex;
align-items: center;
gap: 4px;
padding: 12px 16px;
border-bottom: 1px solid var(--input-border);
background: transparent;
flex-shrink: 0;
}
.tab-button {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 6px 12px;
font-size: 12px;
font-weight: 500;
color: var(--text-color);
opacity: 0.6;
background: transparent;
border: none;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
}
.tab-button:hover {
opacity: 0.9;
background: var(--section-bg);
}
.tab-button.active {
opacity: 1;
background: var(--section-bg);
color: var(--text-color);
}
.tab-button i {
font-size: 14px;
}
/* Tab Content */
.tab-content {
display: none;
flex: 1;
overflow: hidden;
}
.tab-content.active {
display: flex;
flex-direction: column;
}
.tab-inner {
flex: 1;
overflow-y: auto;
padding: 20px;
display: flex;
flex-direction: column;
gap: 16px;
min-height: 0;
}
/* Lists Tab Styles */
.list-selector-section {
display: flex;
flex-direction: column;
gap: 12px;
}
.list-selector-row {
display: flex;
gap: 8px;
}
.list-dropdown-wrapper {
flex: 1;
position: relative;
}
.list-dropdown-button {
width: 100%;
height: 40px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 12px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
font-size: 14px;
color: var(--text-color);
}
.list-dropdown-button:hover {
background: var(--section-bg);
}
.list-dropdown-content {
display: flex;
align-items: center;
gap: 8px;
}
.list-color-indicator {
width: 12px;
height: 12px;
border-radius: 50%;
flex-shrink: 0;
}
.list-dropdown-text {
font-size: 14px;
color: var(--text-color);
}
.list-dropdown-button i {
font-size: 16px;
color: var(--text-color);
opacity: 0.6;
}
.list-dropdown-menu {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
margin-top: 4px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
z-index: 100;
max-height: 200px;
overflow-y: auto;
}
.list-dropdown-menu.open {
display: block;
}
.list-dropdown-item {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 12px;
cursor: pointer;
transition: background 0.2s;
}
.list-dropdown-item:hover {
background: var(--section-bg);
}
.list-dropdown-item.selected {
background: var(--section-bg);
}
.list-dropdown-item-check {
margin-left: auto;
color: var(--accent);
font-size: 16px;
}
.icon-button {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
flex-shrink: 0;
}
.icon-button:hover {
background: var(--section-bg);
}
.icon-button.danger:hover {
background: rgba(239, 68, 68, 0.1);
color: var(--danger);
border-color: rgba(239, 68, 68, 0.5);
}
.icon-button i {
font-size: 16px;
color: var(--text-color);
}
.icon-button.danger i {
color: var(--text-color);
}
.icon-button.danger:hover i {
color: var(--danger);
}
.manage-lists-btn {
width: 100%;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
font-size: 14px;
color: var(--text-color);
}
.manage-lists-btn:hover {
background: var(--section-bg);
}
.manage-lists-btn i {
font-size: 16px;
}
/* Color Pickers */
.color-pickers-row {
display: flex;
gap: 16px;
}
.color-picker-group {
flex: 1;
display: flex;
flex-direction: column;
gap: 6px;
}
.color-picker-label {
font-size: 12px;
color: var(--text-color);
opacity: 0.6;
}
.color-picker-input-group {
display: flex;
align-items: center;
gap: 8px;
}
.color-picker-swatch {
width: 40px;
height: 40px;
border-radius: 8px;
border: 2px solid var(--input-border);
cursor: pointer;
background: transparent;
padding: 0;
}
.color-picker-swatch::-webkit-color-swatch-wrapper {
padding: 0;
border-radius: 6px;
}
.color-picker-swatch::-webkit-color-swatch {
border: none;
border-radius: 6px;
}
.color-picker-text {
flex: 1;
height: 40px;
padding: 0 12px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
font-size: 14px;
font-family: 'Courier New', monospace;
text-transform: uppercase;
color: var(--text-color);
}
.color-picker-text:focus {
outline: none;
border-color: var(--accent);
}
/* Preview */
.preview-section {
display: flex;
flex-direction: column;
gap: 6px;
}
.preview-label {
font-size: 12px;
color: var(--text-color);
opacity: 0.6;
}
.preview-box {
padding: 12px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
}
.preview-text {
font-size: 14px;
color: var(--text-color);
opacity: 0.6;
line-height: 1.5;
}
.preview-highlight {
padding: 2px 4px;
border-radius: 4px;
}
/* Enable Toggle */
.enable-toggle-section {
padding: 12px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
}
.enable-toggle-content {
display: flex;
align-items: center;
justify-content: space-between;
}
.enable-toggle-text {
display: flex;
flex-direction: column;
gap: 2px;
}
.enable-toggle-title {
font-size: 14px;
font-weight: 500;
color: var(--text-color);
}
.enable-toggle-subtitle {
font-size: 12px;
color: var(--text-color);
opacity: 0.6;
}
/* Apply Button */
.apply-button {
width: 100%;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
background: var(--accent);
color: var(--accent-text);
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s;
}
.apply-button:hover {
background: var(--accent-hover);
}
.apply-button i {
font-size: 16px;
}
/* Words Tab Styles */
.add-words-section {
display: flex;
flex-direction: column;
gap: 8px;
}
.section-label {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
font-weight: 500;
color: var(--text-color);
opacity: 0.6;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.section-label i {
font-size: 14px;
}
.word-count-badge {
color: var(--accent);
opacity: 1;
}
.add-words-textarea {
min-height: 72px;
padding: 10px 12px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
font-size: 14px;
color: var(--text-color);
font-family: inherit;
resize: none;
line-height: 1.5;
}
.add-words-textarea:focus {
outline: none;
border-color: var(--accent);
}
.add-words-button {
width: 100%;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
background: var(--accent);
color: var(--accent-text);
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s;
}
.add-words-button:hover {
background: var(--accent-hover);
}
.add-words-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Word List Section */
.word-list-section {
display: flex;
flex-direction: column;
gap: 8px;
flex: 1;
min-height: 0;
}
.word-list-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.word-actions-row {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.word-action-btn {
height: 28px;
padding: 0 10px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 6px;
cursor: pointer;
font-size: 12px;
color: var(--text-color);
transition: all 0.2s;
}
.word-action-btn:hover {
background: var(--section-bg);
}
.word-action-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.word-action-btn.danger {
background: rgba(239, 68, 68, 0.1);
border-color: rgba(239, 68, 68, 0.3);
color: var(--danger);
}
.word-action-btn.danger:hover {
background: rgba(239, 68, 68, 0.2);
}
/* Word Search */
.word-search-wrapper {
position: relative;
}
.word-search-icon {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
font-size: 16px;
color: var(--text-color);
opacity: 0.6;
pointer-events: none;
}
.word-search-input {
width: 100%;
height: 36px;
padding: 0 12px 0 36px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
font-size: 14px;
color: var(--text-color);
}
.word-search-input:focus {
outline: none;
border-color: var(--accent);
}
/* Word List Container */
.word-list-container {
flex: 1;
overflow-y: auto;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
max-height: 180px;
min-height: 0;
}
.word-list-empty {
padding: 24px;
text-align: center;
font-size: 14px;
color: var(--text-color);
opacity: 0.6;
}
.word-item {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
cursor: pointer;
transition: all 0.2s;
border-bottom: 1px solid var(--input-border);
}
.word-item:last-child {
border-bottom: none;
}
.word-item:hover {
background: var(--highlight-tag);
}
.word-item.selected {
background: var(--section-bg);
}
.word-item-checkbox {
width: 16px;
height: 16px;
border: 1.5px solid var(--text-color);
border-radius: 4px;
cursor: pointer;
flex-shrink: 0;
opacity: 0.6;
position: relative;
background: transparent;
}
.word-item-checkbox.checked {
background: var(--accent);
border-color: var(--accent);
opacity: 1;
}
.word-item-checkbox.checked::after {
content: "✓";
position: absolute;
top: -3px;
left: 2px;
color: white;
font-size: 12px;
font-weight: bold;
}
.word-item-text {
flex: 1;
font-size: 14px;
color: var(--text-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
}
.word-item-edit-input {
flex: 1;
height: 28px;
padding: 0 8px;
background: var(--bg-color);
border: 1px solid var(--accent);
border-radius: 4px;
font-size: 14px;
color: var(--text-color);
}
.word-item-edit-input:focus {
outline: none;
}
.word-item-actions {
display: flex;
align-items: center;
gap: 4px;
}
.word-item-icon-btn {
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
cursor: pointer;
border-radius: 4px;
transition: all 0.2s;
color: var(--text-color);
opacity: 0.6;
flex-shrink: 0;
}
.word-item-icon-btn:hover {
opacity: 1;
background: var(--highlight-tag);
color: var(--accent);
}
.word-item-icon-btn i {
font-size: 14px;
}
.word-item-color-picker {
width: 28px;
height: 28px;
border-radius: 4px;
border: 1px solid var(--input-border);
cursor: pointer;
background: transparent;
padding: 0;
flex-shrink: 0;
}
.word-item-color-picker::-webkit-color-swatch-wrapper {
padding: 0;
border-radius: 3px;
}
.word-item-color-picker::-webkit-color-swatch {
border: none;
border-radius: 3px;
}
.word-item-color-picker:hover {
border-color: var(--accent);
}
.word-item-switch {
flex-shrink: 0;
}
.word-list-hint {
font-size: 12px;
color: var(--text-color);
opacity: 0.6;
text-align: center;
}
/* Empty State */
.empty-state {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 32px;
text-align: center;
}
.empty-state p {
font-size: 14px;
color: var(--text-color);
opacity: 0.6;
}
/* Page Highlights Tab */
.page-highlights-section {
display: flex;
flex-direction: column;
gap: 12px;
flex: 1;
min-height: 0;
}
.page-highlights-info-card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
font-size: 14px;
color: var(--text-color);
}
.page-highlights-info-card strong {
font-weight: 600;
color: var(--accent);
}
.refresh-button {
width: 100%;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
cursor: pointer;
font-size: 14px;
color: var(--text-color);
transition: all 0.2s;
}
.refresh-button:hover {
background: var(--section-bg);
}
.refresh-button i {
font-size: 16px;
}
.page-highlights-list {
flex: 1;
overflow-y: auto;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
min-height: 0;
}
.page-highlights-empty {
padding: 24px;
text-align: center;
font-size: 14px;
color: var(--text-color);
opacity: 0.6;
}
.page-highlight-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px;
border-bottom: 1px solid var(--input-border);
cursor: pointer;
transition: all 0.2s;
}
.page-highlight-item:last-child {
border-bottom: none;
}
.page-highlight-item:hover {
background: var(--section-bg);
border-left: 3px solid var(--accent);
padding-left: 9px;
}
.page-highlight-word {
flex: 1;
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.page-highlight-preview {
display: inline-block;
padding: 3px 8px;
border-radius: 4px;
font-size: 13px;
font-weight: 500;
}
.page-highlight-position {
font-size: 11px;
color: var(--text-color);
opacity: 0.6;
margin-left: 4px;
}
.page-highlight-count {
background: var(--accent);
color: var(--accent-text);
padding: 3px 10px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
flex-shrink: 0;
}
.page-highlight-nav {
display: flex;
gap: 4px;
flex-shrink: 0;
}
.page-highlight-nav button {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
padding: 0;
}
.page-highlight-nav button:hover {
background: var(--section-bg);
border-color: var(--accent);
}
.page-highlight-nav button i {
font-size: 14px;
color: var(--text-color);
}
/* Exceptions Tab */
.exceptions-section {
display: flex;
flex-direction: column;
gap: 12px;
flex: 1;
min-height: 0;
}
.exception-toggle-btn {
width: 100%;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
cursor: pointer;
font-size: 14px;
color: var(--text-color);
transition: all 0.2s;
}
.exception-toggle-btn:hover {
background: var(--section-bg);
}
.exception-toggle-btn.danger {
background: rgba(239, 68, 68, 0.1);
border-color: rgba(239, 68, 68, 0.3);
color: var(--danger);
}
.exception-toggle-btn.danger:hover {
background: rgba(239, 68, 68, 0.2);
}
.exception-toggle-btn i {
font-size: 16px;
}
.exceptions-list-wrapper {
display: flex;
flex-direction: column;
gap: 8px;
flex: 1;
min-height: 0;
}
.exceptions-list {
flex: 1;
overflow-y: auto;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
min-height: 0;
}
.exception-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px;
border-bottom: 1px solid var(--input-border);
transition: background 0.2s;
}
.exception-item:last-child {
border-bottom: none;
}
.exception-item:hover {
background: var(--section-bg);
}
.exception-domain {
flex: 1;
font-size: 14px;
color: var(--text-color);
word-break: break-word;
line-height: 1.4;
}
.exception-remove {
background: var(--danger);
color: white;
border: none;
padding: 6px 12px;
border-radius: 6px;
cursor: pointer;
font-size: 12px;
font-weight: 500;
white-space: nowrap;
flex-shrink: 0;
transition: all 0.2s;
}
.exception-remove:hover {
background: #dc2626;
}
.clear-exceptions-btn {
width: 100%;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.3);
color: var(--danger);
border-radius: 8px;
cursor: pointer;
font-size: 14px;
transition: all 0.2s;
}
.clear-exceptions-btn:hover {
background: rgba(239, 68, 68, 0.2);
}
.clear-exceptions-btn i {
font-size: 16px;
}
/* Options Tab */
.options-section {
display: flex;
flex-direction: column;
gap: 16px;
}
.options-checkboxes {
display: flex;
flex-direction: column;
gap: 12px;
padding: 12px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
}
.option-checkbox-label {
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
font-size: 14px;
color: var(--text-color);
}
.option-checkbox {
width: 18px;
height: 18px;
border: 2px solid var(--input-border);
border-radius: 4px;
cursor: pointer;
flex-shrink: 0;
appearance: none;
background: var(--input-bg);
position: relative;
}
.option-checkbox:checked {
background: var(--accent);
border-color: var(--accent);
}
.option-checkbox:checked::after {
content: "✓";
position: absolute;
top: -2px;
left: 3px;
color: white;
font-size: 14px;
font-weight: bold;
}
.options-buttons {
display: flex;
gap: 8px;
}
.option-button {
flex: 1;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
background: var(--input-bg);
border: 1px solid var(--input-border);
border-radius: 8px;
cursor: pointer;
font-size: 14px;
color: var(--text-color);
transition: all 0.2s;
}
.option-button:hover {
background: var(--section-bg);
}
.option-button i {
font-size: 16px;
}
/* Footer */
.footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 20px;
border-top: 1px solid var(--input-border);
background: var(--section-bg);
flex-shrink: 0;
}
.footer-version {
font-size: 12px;
color: var(--text-color);
opacity: 0.6;
}
.footer-link {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: var(--text-color);
opacity: 0.6;
text-decoration: none;
transition: all 0.2s;
}
.footer-link:hover {
opacity: 1;
color: var(--accent);
}
.footer-link i {
font-size: 14px;
}
/* Scrollbar Styles */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--input-border);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--accent);
}