/* ==========================================================================
   ELITE ECONOMIC CALENDAR CSS
   Glassmorphism, Day Grouping, Impact Color Coding
   ========================================================================== */

/* Layout & Globals */
.ecc-container { margin-left: 20px; padding: 32px; min-height: 100vh; color: #ffffff; font-family: 'Inter', sans-serif; display: flex; flex-direction: column; gap: 24px; position: relative; }
.hidden { display: none !important; }
.m-0 { margin: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-sm { font-size: 0.85rem; } .text-muted { color: rgba(255,255,255,0.6); } .w-full { width: 100%; } .text-center { text-align: center; }
.uppercase { text-transform: uppercase; } .letter-spacing { letter-spacing: 1px; } .font-bold { font-weight: 700; } .tabular-nums { font-variant-numeric: tabular-nums; }
.flex-align-center { display: flex; align-items: center; } .gap-8 { gap: 8px; } .flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Palette */
.text-purple { color: #c084fc; } .text-cyan { color: #06b6d4; } .text-gold { color: #fbbf24; } .text-red { color: #ef5350; } .text-green { color: #22c55e; } .text-white { color: #ffffff; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(239,83,80,0.4); } 70% { box-shadow: 0 0 0 15px rgba(239,83,80,0); } 100% { box-shadow: 0 0 0 0 rgba(239,83,80,0); } }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.fade-in { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.spinning { animation: spin 1s linear infinite; }

/* Buttons & Inputs */
.ecc-btn { padding: 10px 20px; border-radius: 12px; font-weight: 700; font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s; border: none; text-transform: uppercase; font-family: inherit; }
.ecc-btn--primary { background: linear-gradient(135deg, #a855f7, #7e22ce); color: white; box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3); }
.ecc-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5); }
.ecc-btn--secondary { background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); }
.ecc-btn--secondary:hover { background: rgba(255,255,255,0.1); border-color: #c084fc; color: #c084fc; }
.ecc-btn--danger { background: linear-gradient(135deg, #ef5350, #c62828); color: white; }
.ecc-btn-icon-small { background: transparent; border: none; color: rgba(255,255,255,0.6); cursor: pointer; transition: 0.2s; font-size: 1rem; }
.ecc-btn-icon-small:hover { color: white; }

.ecc-input, .ecc-select { width: 100%; padding: 10px 14px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 8px; transition: 0.3s; font-family: inherit; font-size: 0.85rem; outline: none; }
.ecc-input:focus, .ecc-select:focus { border-color: #c084fc; box-shadow: 0 0 0 2px rgba(192,132,252,0.2); }
.ecc-form-group { margin-bottom: 16px; }
.ecc-form-group label { display: block; margin-bottom: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.8); font-weight: 600; }

/* Switch Toggle */
.ecc-switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.ecc-switch input { opacity: 0; width: 0; height: 0; }
.ecc-slider-toggle { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.1); transition: .4s; border-radius: 24px; }
.ecc-slider-toggle:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
.ecc-switch input:checked + .ecc-slider-toggle { background-color: #a855f7; }
.ecc-switch input:checked + .ecc-slider-toggle:before { transform: translateX(20px); }

/* Banners */
.ecc-offline-banner { background: rgba(249,115,22,0.15); border: 1px solid rgba(249,115,22,0.3); color: #fdba74; padding: 12px 24px; border-radius: 12px; font-weight: 700; text-align: center; font-size: 0.9rem; }
.ecc-next-banner { background: rgba(20,15,25,0.9); border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; overflow: hidden; display: flex; box-shadow: 0 10px 40px rgba(0,0,0,0.5); animation: slideDown 0.5s ease-out; }
.ecc-next-banner.pulse-active { animation: pulseGlow 2s infinite; border-color: rgba(239,83,80,0.5); }
.ecc-next-impact { width: 8px; background: #c084fc; flex-shrink: 0; }
.ecc-next-impact.imp-high { background: #ef5350; }
.ecc-next-content { padding: 24px 32px; display: flex; justify-content: space-between; align-items: center; flex-grow: 1; flex-wrap: wrap; gap: 24px; }
.ecc-next-data { display: flex; gap: 24px; background: rgba(0,0,0,0.3); padding: 16px 24px; border-radius: 16px; }
.data-box { display: flex; flex-direction: column; }
.data-box .lbl { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 4px; }
.data-box .val { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ecc-next-timer { display: flex; flex-direction: column; align-items: center; }
.ecc-next-timer .lbl { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.ecc-next-timer .val { font-size: 2rem; font-weight: 800; }

/* Header Elements */
.ecc-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 24px; }
.ecc-header__title { font-size: 2.2rem; font-weight: 800; margin: 0 0 8px 0; letter-spacing: 1px; }
.ecc-header__subtitle { color: #c084fc; margin: 0; font-size: 1rem; }
.ecc-header__stats { display: flex; gap: 24px; }
.ecc-stat-card { text-align: center; }
.ecc-stat-val { display: block; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ecc-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; }

/* Filters */
.ecc-filters { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: rgba(255,255,255,0.03); padding: 12px 20px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); }
.ecc-search { position: relative; flex-grow: 1; max-width: 300px; }
.ecc-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.4); }
.ecc-search input { width: 100%; padding: 10px 14px 10px 36px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 8px; outline: none; }
.ecc-search input:focus { border-color: #c084fc; }
.ecc-checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.ecc-checkbox-label input { accent-color: #fbbf24; width: 16px; height: 16px; }

/* Calendar List */
.ecc-main { flex-grow: 1; overflow-y: auto; padding-right: 12px; }
.ecc-main::-webkit-scrollbar { width: 6px; }
.ecc-main::-webkit-scrollbar-thumb { background: rgba(192,132,252,0.3); border-radius: 10px; }

.ecc-day-group { margin-bottom: 32px; }
.ecc-day-header { position: sticky; top: 0; background: rgba(14,12,18,0.85); backdrop-filter: blur(12px); padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); z-index: 10; display: flex; justify-content: space-between; align-items: center; }
.ecc-day-title { font-size: 1rem; font-weight: 800; color: #c084fc; letter-spacing: 1px; text-transform: uppercase; margin: 0; }
.ecc-day-chip { font-size: 0.75rem; background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 12px; color: rgba(255,255,255,0.8); }

.ecc-event-row { display: grid; grid-template-columns: 80px 40px 12px 3fr 1fr 1.5fr auto; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.2s, transform 0.2s; border-radius: 8px; cursor: pointer; }
.ecc-event-row:hover { background: rgba(255,255,255,0.03); transform: translateX(4px); border-color: rgba(192,132,252,0.2); }
.ecc-event-row.past { opacity: 0.7; }
.ecc-event-row.past:hover { opacity: 1; }

.ecc-ev-time { font-size: 0.9rem; font-weight: 700; color: rgba(255,255,255,0.7); tabular-nums: tabular-nums; }
.ecc-ev-flag { font-size: 1.5rem; text-align: center; }
.ecc-ev-impact { width: 8px; height: 30px; border-radius: 4px; background: rgba(255,255,255,0.2); }
.ecc-ev-impact.imp-low { background: #22c55e; }
.ecc-ev-impact.imp-medium { background: #fbbf24; }
.ecc-ev-impact.imp-high { background: #f97316; }
.ecc-ev-impact.imp-extreme { background: #ef5350; }

.ecc-ev-main { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.ecc-ev-title { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.ecc-ev-syms { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

.ecc-badge { font-size: 0.65rem; padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,0.1); text-transform: uppercase; font-weight: 800; letter-spacing: 1px; }
.ecc-badge.imp-extreme { background: rgba(239,83,80,0.2); color: #ef5350; border: 1px solid rgba(239,83,80,0.4); }
.ecc-badge.imp-high { background: rgba(249,115,22,0.2); color: #f97316; border: 1px solid rgba(249,115,22,0.4); }

.ecc-ev-curr { font-weight: 700; color: rgba(255,255,255,0.6); text-align: center; }
.ecc-ev-data { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.ecc-ev-data > div { flex: 1; text-align: right; }
.ecc-ev-data .prev { color: rgba(255,255,255,0.5); }
.ecc-ev-data .fcst { color: rgba(255,255,255,0.8); }
.ecc-ev-data .act { font-weight: 800; }
.act-beat { color: #22c55e; }
.act-miss { color: #ef5350; }

.ecc-ev-actions { display: flex; gap: 12px; opacity: 0; transition: 0.2s; }
.ecc-event-row:hover .ecc-ev-actions { opacity: 1; }
.ev-act-btn { background: transparent; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 1.1rem; transition: 0.2s; }
.ev-act-btn:hover { color: #c084fc; transform: scale(1.1); }
.ev-act-btn.is-watched { color: #fbbf24; opacity: 1; }
.ecc-event-row:hover .ev-act-btn.is-watched { color: #fbbf24; }

/* Modals */
.ecc-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.ecc-modal__overlay { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); }
.ecc-modal__content { position: relative; background: #0d0b12; border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.ecc-modal__close { position: absolute; top: 24px; right: 24px; background: none; border: none; color: rgba(255,255,255,0.5); font-size: 1.5rem; cursor: pointer; transition: 0.3s; }
.ecc-modal__close:hover { color: white; }

.ecc-detail-header { display: flex; align-items: flex-start; gap: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 24px; }
.ecc-detail-flag { font-size: 4rem; line-height: 1; }
.ecc-detail-values { display: flex; gap: 16px; }
.ecc-detail-values .val-box { flex: 1; background: rgba(255,255,255,0.03); padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; align-items: center; }
.ecc-detail-values .val-box--actual { background: rgba(168,85,247,0.05); border-color: rgba(168,85,247,0.3); position: relative; }
.ecc-detail-values .lbl { font-size: 0.8rem; text-transform: uppercase; margin-bottom: 8px; font-weight: 600; color: rgba(255,255,255,0.6); }
.ecc-detail-values .num { font-size: 1.8rem; tabular-nums: tabular-nums; }
.surprise-tag { position: absolute; top: -10px; right: -10px; padding: 4px 8px; border-radius: 8px; font-size: 0.75rem; font-weight: 800; background: #1a1a1a; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

.ecc-mini-stats { display: flex; gap: 16px; }
.ecc-mini-stat { background: rgba(0,0,0,0.3); padding: 12px; border-radius: 8px; flex: 1; text-align: center; }
.ecc-mini-stat .lbl { font-size: 0.7rem; color: rgba(255,255,255,0.5); display: block; margin-bottom: 4px; }
.ecc-mini-stat .val { font-size: 1.1rem; font-weight: 700; }

.ecc-detail-actions { display: flex; gap: 16px; }

/* Tabs */
.ecc-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.1); }
.ecc-tab { background: transparent; border: none; padding: 12px 24px; color: rgba(255,255,255,0.5); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; transition: 0.3s; }
.ecc-tab:hover { color: white; }
.ecc-tab.active { color: #c084fc; border-bottom-color: #c084fc; }
.ecc-tab-content { display: none; padding-top: 16px; }
.ecc-tab-content.active { display: block; animation: fadeInUp 0.3s forwards; }

.ecc-card { background: rgba(255,255,255,0.03); backdrop-filter: blur(24px) saturate(180%); border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05); }

/* Shimmer Loading */
.skeleton-row { height: 60px; background: rgba(255,255,255,0.05); border-radius: 8px; margin-bottom: 12px; position: relative; overflow: hidden; }
.skeleton-row::after { content:''; position:absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }