ttzzs's picture
feat: Add Copy to Clipboard with Interactive Preview to Excel Add-in
ccf0441 verified
/* ====================================================================
CHRONOS2 FORECASTING ADD-IN - STYLES
==================================================================== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
font-size: 14px;
line-height: 1.5;
color: #333;
background: #f5f7fa;
padding: 0;
margin: 0;
}
.container {
max-width: 100%;
padding: 16px;
}
/* Header */
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 20px;
margin: -16px -16px 20px -16px;
text-align: center;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.header h1 {
font-size: 24px;
margin-bottom: 4px;
}
.subtitle {
font-size: 12px;
opacity: 0.9;
}
/* Status Card */
.status-card {
background: white;
border-radius: 8px;
padding: 12px;
margin-bottom: 16px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.status-indicator {
display: flex;
align-items: center;
font-size: 13px;
}
.status-indicator .dot {
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 8px;
animation: pulse 2s infinite;
}
.status-indicator.online .dot {
background: #10b981;
}
.status-indicator.offline .dot {
background: #ef4444;
animation: none;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* Tabs */
.tabs {
display: flex;
gap: 4px;
margin-bottom: 16px;
background: white;
padding: 4px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.tab {
flex: 1;
background: transparent;
border: none;
padding: 8px 12px;
font-size: 12px;
font-weight: 500;
color: #666;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
}
.tab:hover {
background: #f3f4f6;
}
.tab.active {
background: #667eea;
color: white;
}
/* Tab Content */
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
/* Cards */
.card {
background: white;
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.card h2 {
font-size: 16px;
margin-bottom: 8px;
color: #1f2937;
}
.card p {
font-size: 13px;
color: #6b7280;
margin-bottom: 12px;
}
/* Form Groups */
.form-group {
margin-bottom: 12px;
}
.form-group label {
display: block;
font-size: 12px;
font-weight: 500;
margin-bottom: 4px;
color: #374151;
}
.form-group input,
.form-group select {
width: 100%;
padding: 8px 12px;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 13px;
transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
/* Buttons */
.btn {
width: 100%;
padding: 10px 16px;
border: none;
border-radius: 6px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
margin-top: 8px;
}
.btn-primary {
background: #667eea;
color: white;
}
.btn-primary:hover {
background: #5568d3;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}
.btn-secondary {
background: #10b981;
color: white;
}
.btn-secondary:hover {
background: #059669;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}
.btn:active {
transform: translateY(0);
}
/* Info Box */
.info-box {
background: #eff6ff;
border-left: 3px solid #3b82f6;
padding: 12px;
border-radius: 4px;
font-size: 12px;
margin-bottom: 12px;
color: #1e40af;
}
/* Results Card */
.results-card {
background: white;
border-radius: 8px;
padding: 16px;
margin-top: 16px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.results-card h3 {
font-size: 14px;
margin-bottom: 12px;
color: #1f2937;
}
.results-log {
max-height: 200px;
overflow-y: auto;
font-family: 'Monaco', 'Courier New', monospace;
font-size: 11px;
background: #f9fafb;
padding: 8px;
border-radius: 4px;
}
.log-entry {
padding: 4px 0;
border-bottom: 1px solid #e5e7eb;
}
.log-entry:last-child {
border-bottom: none;
}
.log-entry .timestamp {
color: #9ca3af;
margin-right: 8px;
}
.log-success {
color: #059669;
}
.log-error {
color: #dc2626;
}
.log-info {
color: #3b82f6;
}
/* Footer */
.footer {
text-align: center;
padding: 16px;
margin-top: 20px;
font-size: 11px;
color: #9ca3af;
}
.footer .version {
margin-top: 4px;
color: #d1d5db;
}
/* Scrollbar */
.results-log::-webkit-scrollbar {
width: 6px;
}
.results-log::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
.results-log::-webkit-scrollbar-thumb {
background: #888;
border-radius: 3px;
}
.results-log::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* ====================================================================
FORECAST PREVIEW & COPY TO CLIPBOARD
==================================================================== */
/* Forecast Preview Card */
.forecast-preview-card {
background: white;
border-radius: 12px;
padding: 16px;
margin-bottom: 20px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
border: 2px solid #667eea;
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.preview-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 2px solid #f0f0f0;
}
.preview-header h3 {
font-size: 16px;
font-weight: 600;
color: #667eea;
margin: 0;
}
.preview-count {
font-size: 12px;
background: #667eea;
color: white;
padding: 4px 12px;
border-radius: 12px;
font-weight: 500;
}
.preview-table-container {
max-height: 200px;
overflow-y: auto;
margin-bottom: 12px;
border-radius: 6px;
border: 1px solid #e5e7eb;
}
.preview-table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.preview-table thead {
position: sticky;
top: 0;
background: #f9fafb;
z-index: 1;
}
.preview-table th {
padding: 8px;
text-align: left;
font-weight: 600;
color: #374151;
border-bottom: 2px solid #e5e7eb;
}
.preview-table td {
padding: 8px;
border-bottom: 1px solid #f0f0f0;
color: #4b5563;
}
.preview-table tbody tr:hover {
background: #f9fafb;
}
.preview-table .preview-more td {
text-align: center;
font-style: italic;
color: #9ca3af;
}
.preview-actions {
display: flex;
flex-direction: column;
gap: 8px;
}
.btn-copy-forecast {
width: 100%;
font-size: 14px;
font-weight: 600;
padding: 12px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}
.btn-copy-forecast:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.preview-hint {
text-align: center;
font-size: 11px;
color: #6b7280;
padding: 8px;
background: #f9fafb;
border-radius: 6px;
}
/* Copy Toast Notification */
.copy-toast {
position: fixed;
top: 20px;
right: 20px;
z-index: 9999;
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
color: white;
padding: 16px 20px;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
opacity: 0;
transform: translateX(100px);
transition: all 0.3s ease-out;
}
.copy-toast.show {
opacity: 1;
transform: translateX(0);
}
.toast-content {
display: flex;
align-items: center;
gap: 12px;
}
.toast-icon {
font-size: 24px;
}
.toast-text {
font-size: 14px;
font-weight: 600;
}
/* Copy Fallback Modal */
.copy-fallback-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10000;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
animation: fadeIn 0.2s;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.copy-fallback-modal .modal-content {
background: white;
border-radius: 12px;
padding: 24px;
max-width: 500px;
width: 100%;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.copy-fallback-modal h3 {
margin: 0 0 12px 0;
font-size: 18px;
color: #1f2937;
}
.copy-fallback-modal p {
margin: 0 0 12px 0;
font-size: 13px;
color: #6b7280;
}
.copy-textarea {
width: 100%;
height: 200px;
padding: 12px;
border: 2px solid #e5e7eb;
border-radius: 6px;
font-family: 'Courier New', monospace;
font-size: 11px;
resize: vertical;
margin-bottom: 12px;
}
.copy-textarea:focus {
outline: none;
border-color: #667eea;
}