Files
trade-assistant/browser-extension/popup/popup.css
T

505 lines
7.9 KiB
CSS

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
width: 400px;
min-height: 480px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
font-size: 14px;
color: #333;
background: #f8fafc;
}
#app {
display: flex;
flex-direction: column;
height: 100%;
min-height: 480px;
}
/* Header */
.header {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
background: linear-gradient(135deg, #2563eb, #1d4ed8);
color: #fff;
}
.logo {
font-size: 18px;
font-weight: 700;
letter-spacing: 0.5px;
}
.badge {
font-size: 11px;
background: rgba(255,255,255,0.2);
padding: 2px 8px;
border-radius: 10px;
}
/* Screens */
.screen {
flex: 1;
padding: 16px;
overflow-y: auto;
}
/* Tabs */
.tabs {
display: flex;
gap: 4px;
margin-bottom: 12px;
background: #e8edf5;
border-radius: 8px;
padding: 4px;
}
.tab {
flex: 1;
padding: 8px 4px;
border: none;
background: transparent;
border-radius: 6px;
font-size: 13px;
cursor: pointer;
color: #64748b;
transition: all 0.2s;
font-weight: 500;
}
.tab:hover {
color: #2563eb;
background: rgba(37, 99, 235, 0.08);
}
.tab.active {
background: #fff;
color: #2563eb;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
/* Form Elements */
input, textarea, select {
width: 100%;
padding: 10px 12px;
border: 1px solid #d1d5db;
border-radius: 8px;
font-size: 13px;
font-family: inherit;
outline: none;
transition: border-color 0.2s;
background: #fff;
}
input:focus, textarea:focus, select:focus {
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
textarea {
resize: vertical;
min-height: 60px;
margin-bottom: 8px;
}
input {
margin-bottom: 8px;
}
select {
margin-bottom: 0;
cursor: pointer;
}
.row {
display: flex;
gap: 8px;
align-items: flex-start;
}
.row select {
flex: 1;
}
.row input {
flex: 1;
margin-bottom: 0;
}
.btn {
padding: 10px 20px;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
white-space: nowrap;
}
.btn-primary {
background: #2563eb;
color: #fff;
}
.btn-primary:hover {
background: #1d4ed8;
}
.btn-primary:active {
transform: scale(0.97);
}
.btn-link {
background: none;
border: none;
color: #64748b;
font-size: 13px;
cursor: pointer;
padding: 4px 8px;
}
.btn-link:hover {
color: #2563eb;
}
/* Result Box */
.result-box {
margin-top: 8px;
padding: 12px;
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 8px;
min-height: 40px;
font-size: 13px;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-word;
}
.result-box:empty {
display: none;
}
.result-box .loading {
color: #64748b;
display: flex;
align-items: center;
gap: 8px;
}
.result-box .error {
color: #dc2626;
}
.result-box .item {
padding: 8px 0;
border-bottom: 1px solid #f0f0f0;
}
.result-box .item:last-child {
border-bottom: none;
}
.result-box .item-label {
font-weight: 600;
color: #2563eb;
margin-bottom: 4px;
}
.spinner {
display: inline-block;
width: 14px;
height: 14px;
border: 2px solid #e0e0e0;
border-top-color: #2563eb;
border-radius: 50%;
animation: spin 0.6s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Settings */
.form-group {
margin-bottom: 12px;
}
.form-group label {
display: block;
font-size: 12px;
font-weight: 600;
color: #64748b;
margin-bottom: 4px;
}
.status {
margin-top: 8px;
font-size: 13px;
}
.status.success { color: #16a34a; }
.status.error { color: #dc2626; }
.hint {
font-size: 12px;
color: #94a3b8;
margin-top: 12px;
line-height: 1.5;
}
/* Footer */
.footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 16px;
border-top: 1px solid #e5e7eb;
background: #fff;
}
.credits {
font-size: 12px;
color: #94a3b8;
}
/* Inline Copy Button */
.copy-btn {
float: right;
padding: 2px 8px;
font-size: 11px;
border: 1px solid #d1d5db;
border-radius: 4px;
background: #fff;
cursor: pointer;
color: #64748b;
}
.copy-btn:hover {
background: #f0f4ff;
color: #2563eb;
}
/* ─── Upgrade Banner ─────────────────────────────── */
.upgrade-banner {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
background: linear-gradient(135deg, #fef3c7, #fde68a);
border-top: 1px solid #f59e0b;
font-size: 13px;
animation: slideUp 0.3s ease;
}
.upgrade-banner-text {
flex: 1;
color: #92400e;
font-weight: 500;
}
.upgrade-btn {
padding: 6px 16px;
border: none;
border-radius: 6px;
background: #f59e0b;
color: #fff;
font-size: 13px;
font-weight: 600;
cursor: pointer;
white-space: nowrap;
transition: background 0.2s;
}
.upgrade-btn:hover {
background: #d97706;
}
.upgrade-close {
background: none;
border: none;
font-size: 18px;
color: #92400e;
cursor: pointer;
padding: 0 4px;
opacity: 0.6;
}
.upgrade-close:hover {
opacity: 1;
}
@keyframes slideUp {
from { transform: translateY(100%); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
/* ─── Credit Error ───────────────────────────────── */
.credit-error {
padding: 12px;
background: #fffbeb;
border: 1px solid #fde68a;
border-radius: 8px;
text-align: center;
font-weight: 500;
}
.credit-error-hint {
display: block;
margin-top: 4px;
font-size: 12px;
font-weight: 400;
color: #92400e;
}
/* ─── Modal ───────────────────────────────────────── */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
animation: fadeIn 0.2s ease;
}
.modal {
background: #fff;
border-radius: 16px;
width: 360px;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 16px 48px rgba(0,0,0,0.2);
animation: scaleIn 0.25s ease;
}
.modal-sm {
width: 300px;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px 0;
}
.modal-header h3 {
font-size: 16px;
color: #1e293b;
}
.modal-close-btn {
background: none;
border: none;
font-size: 22px;
color: #94a3b8;
cursor: pointer;
padding: 0 4px;
}
.modal-close-btn:hover {
color: #64748b;
}
.modal-body {
padding: 16px 20px;
display: flex;
flex-direction: column;
gap: 12px;
}
.modal-footer {
padding: 8px 20px 16px;
text-align: center;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes scaleIn {
from { transform: scale(0.9); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
/* ─── Plan Cards ──────────────────────────────────── */
.plan-card {
padding: 14px 16px;
border: 1px solid #e5e7eb;
border-radius: 12px;
text-align: center;
position: relative;
transition: border-color 0.2s, box-shadow 0.2s;
}
.plan-card:hover {
border-color: #2563eb;
box-shadow: 0 2px 8px rgba(37,99,235,0.1);
}
.plan-card.featured {
border-color: #2563eb;
background: #f8faff;
}
.plan-badge {
position: absolute;
top: -10px;
right: 16px;
background: #2563eb;
color: #fff;
font-size: 11px;
padding: 2px 10px;
border-radius: 10px;
font-weight: 600;
}
.plan-name {
font-size: 14px;
font-weight: 700;
color: #1e293b;
margin-bottom: 4px;
}
.plan-price {
font-size: 24px;
font-weight: 800;
color: #2563eb;
margin-bottom: 8px;
}
.plan-price small {
font-size: 13px;
font-weight: 400;
color: #64748b;
}
.plan-features {
list-style: none;
font-size: 12px;
color: #64748b;
line-height: 1.8;
margin-bottom: 10px;
}
.plan-btn {
width: 100%;
}