/* ==========================================================================
   EARNINGS CALENDAR STYLES — ec- prefix
   Calendar Hub (page-earnings-calendar.php) + Single Event (single-earnings_event.php)
   ========================================================================== */

/* ==========================================================================
   CALENDAR HUB PAGE
   ========================================================================== */

.ec-page {
    padding-bottom: var(--as-space-12);
}

/* Layout */
.ec-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

/* Header */
.ec-header {
    margin-bottom: var(--as-space-6);
}

.ec-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
    margin-bottom: var(--as-space-3);
}

.ec-breadcrumb a {
    color: var(--as-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.ec-breadcrumb a:hover {
    color: var(--as-primary);
}

.ec-breadcrumb .sep {
    color: var(--as-text-tertiary);
}

.ec-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--as-text-primary);
    margin: 0 0 var(--as-space-2);
}

.ec-title-icon {
    display: flex;
    color: var(--as-secondary);
}

.ec-subtitle {
    font-size: var(--as-text-sm);
    color: var(--as-text-secondary);
    margin: 0;
}

/* ==========================================================================
   FILTER BAR
   ========================================================================== */

.ec-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--as-space-3);
    padding: var(--as-space-4);
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    margin-bottom: var(--as-space-6);
}

.ec-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}

.ec-filter-label {
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ec-filter-select,
.ec-filter-input {
    padding: 0.5rem 0.75rem;
    background: var(--as-bg-primary);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-md);
    color: var(--as-text-primary);
    font-size: var(--as-text-sm);
    font-family: inherit;
}

.ec-filter-select:focus,
.ec-filter-input:focus {
    outline: none;
    border-color: var(--as-primary);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.15);
}

/* ==========================================================================
   CALENDAR GRID
   ========================================================================== */

.ec-calendar {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    overflow: hidden;
    margin-bottom: var(--as-space-6);
}

.ec-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--as-space-4);
    border-bottom: 1px solid var(--as-border);
}

.ec-calendar-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--as-bg-primary);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-md);
    color: var(--as-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.ec-calendar-nav-btn:hover {
    background: var(--as-primary);
    color: #fff;
    border-color: var(--as-primary);
}

.ec-calendar-month {
    font-size: var(--as-text-lg);
    font-weight: 700;
    color: var(--as-text-primary);
}

/* Day headers */
.ec-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--as-border);
}

.ec-calendar-header-day {
    padding: var(--as-space-2);
    text-align: center;
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Day grid */
.ec-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.ec-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--as-space-2);
    border-right: 1px solid var(--as-border);
    border-bottom: 1px solid var(--as-border);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.ec-calendar-day:nth-child(7n) {
    border-right: none;
}

.ec-calendar-day:hover {
    background: rgba(0, 102, 255, 0.06);
}

.ec-calendar-day.other-month {
    opacity: 0.3;
    cursor: default;
}

.ec-calendar-day.today {
    background: var(--as-primary);
    color: #fff;
}

.ec-calendar-day.today .ec-day-number {
    color: #fff;
}

.ec-calendar-day.selected {
    border: 2px solid var(--as-primary);
    background: rgba(0, 102, 255, 0.08);
}

.ec-day-number {
    font-size: var(--as-text-sm);
    font-weight: 600;
    color: var(--as-text-primary);
}

.ec-calendar-day.other-month .ec-day-number {
    color: var(--as-text-tertiary);
}

/* Green dot for days with events */
.ec-calendar-day.has-events::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--as-secondary);
    border-radius: 50%;
    position: absolute;
    bottom: 6px;
}

.ec-calendar-day.today.has-events::after {
    background: #fff;
}

/* Event count badge */
.ec-day-count {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--as-secondary);
    line-height: 1;
}

.ec-calendar-day.today .ec-day-count {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */

.ec-section {
    margin-bottom: var(--as-space-8);
}

.ec-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--as-space-4);
    padding-bottom: var(--as-space-3);
    border-bottom: 2px solid var(--as-border);
}

.ec-section-icon {
    display: flex;
    color: var(--as-secondary);
}

.ec-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--as-text-primary);
    margin: 0;
    flex: 1;
}

.ec-section-count {
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-muted);
    background: var(--as-bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

/* ==========================================================================
   EVENT CARDS
   ========================================================================== */

.ec-events-list {
    display: flex;
    flex-direction: column;
    gap: var(--as-space-3);
}

.ec-event-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--as-space-4);
    align-items: center;
    padding: var(--as-space-4);
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    text-decoration: none;
    transition: all 0.2s;
}

.ec-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--as-secondary);
}

/* Ticker badge */
.ec-event-ticker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--as-secondary), #00a87a);
    border-radius: var(--as-radius-lg);
    font-size: var(--as-text-xs);
    font-weight: 800;
    color: #fff;
    font-family: var(--as-font-mono, monospace);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.ec-event-body {
    min-width: 0;
}

.ec-event-title {
    font-size: var(--as-text-sm);
    font-weight: 600;
    color: var(--as-text-primary);
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ec-event-meta {
    display: flex;
    align-items: center;
    gap: var(--as-space-3);
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
}

.ec-event-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ec-event-type-badge.earnings_conference {
    background: rgba(0, 200, 150, 0.15);
    color: var(--as-secondary);
}

.ec-event-type-badge.investor_day {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
}

.ec-event-type-badge.annual_meeting {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.ec-event-type-badge.corporate_conference {
    background: rgba(255, 140, 66, 0.15);
    color: #FF8C42;
}

.ec-event-type-badge.guidance_call {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

/* Timing badges */
.ec-timing-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--as-text-xs);
    font-weight: 700;
    font-family: var(--as-font-mono, monospace);
}

.ec-timing-badge.bmo {
    color: #FF8C42;
}

.ec-timing-badge.amc {
    color: #8B5CF6;
}

.ec-timing-badge.during_market {
    color: var(--as-secondary);
}

/* Beat/Miss badges */
.ec-event-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.ec-beat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: var(--as-text-xs);
    font-weight: 700;
    background: rgba(0, 200, 150, 0.15);
    color: var(--as-secondary);
}

.ec-miss-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: var(--as-text-xs);
    font-weight: 700;
    background: rgba(255, 59, 92, 0.15);
    color: #FF3B5C;
}

.ec-meet-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: var(--as-text-xs);
    font-weight: 700;
    background: rgba(148, 163, 184, 0.15);
    color: var(--as-text-muted);
}

.ec-pending-badge {
    font-size: var(--as-text-xs);
    color: var(--as-text-tertiary);
    font-style: italic;
}

.ec-event-time {
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
    font-family: var(--as-font-mono, monospace);
}

/* ==========================================================================
   WEEK GRID
   ========================================================================== */

.ec-week-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--as-space-3);
}

.ec-week-day {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    overflow: hidden;
}

.ec-week-day-header {
    padding: var(--as-space-2) var(--as-space-3);
    background: var(--as-bg-primary);
    border-bottom: 1px solid var(--as-border);
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ec-week-day-header.today {
    background: var(--as-primary);
    color: #fff;
}

.ec-week-day-events {
    padding: var(--as-space-2);
    display: flex;
    flex-direction: column;
    gap: var(--as-space-1);
    min-height: 80px;
}

.ec-week-event {
    display: flex;
    align-items: center;
    gap: var(--as-space-2);
    padding: 6px 8px;
    border-radius: var(--as-radius-sm);
    text-decoration: none;
    transition: background 0.15s;
    font-size: var(--as-text-xs);
}

.ec-week-event:hover {
    background: rgba(0, 200, 150, 0.08);
}

.ec-week-event-ticker {
    font-weight: 700;
    color: var(--as-secondary);
    font-family: var(--as-font-mono, monospace);
    flex-shrink: 0;
}

.ec-week-event-name {
    color: var(--as-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-week-empty {
    font-size: var(--as-text-xs);
    color: var(--as-text-tertiary);
    padding: var(--as-space-3);
    text-align: center;
    font-style: italic;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.ec-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--as-space-5);
}

.ec-sidebar-sticky {
    position: sticky;
    top: 82px;
    display: flex;
    flex-direction: column;
    gap: var(--as-space-5);
}

/* ==========================================================================
   AD PLACEMENTS
   ========================================================================== */

.ec-leaderboard-top {
    padding: var(--as-space-4) 0;
    text-align: center;
}

.ec-ad-banner {
    margin: var(--as-space-6) 0;
    text-align: center;
}

.ec-ad-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--as-text-tertiary);
    margin-bottom: var(--as-space-2);
}

.ec-ad-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--as-bg-card);
    border: 1px dashed var(--as-border);
    border-radius: var(--as-radius-md);
    color: var(--as-text-tertiary);
    font-size: var(--as-text-xs);
    max-width: 100%;
}

/* ==========================================================================
   SINGLE EVENT PAGE — ec-single- prefix
   ========================================================================== */

.ec-single-page {
    padding-bottom: var(--as-space-12);
}

.ec-single-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

/* Header */
.ec-single-header {
    margin-bottom: var(--as-space-6);
}

.ec-single-ticker-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--as-secondary), #00a87a);
    border-radius: var(--as-radius-xl, 16px);
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--as-font-mono, monospace);
    letter-spacing: 1px;
    margin-bottom: var(--as-space-3);
}

.ec-single-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--as-text-primary);
    margin: 0 0 var(--as-space-3);
    line-height: 1.3;
}

.ec-single-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--as-space-3);
    font-size: var(--as-text-sm);
    color: var(--as-text-muted);
    margin-bottom: var(--as-space-4);
}

.ec-single-meta-sep {
    color: var(--as-text-tertiary);
}

/* Event Details Card */
.ec-details-card {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    padding: var(--as-space-5);
    margin-bottom: var(--as-space-6);
}

.ec-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--as-space-4);
}

.ec-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ec-detail-label {
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ec-detail-value {
    font-size: var(--as-text-base);
    font-weight: 600;
    color: var(--as-text-primary);
}

/* Action buttons (webcast, slides) */
.ec-action-buttons {
    display: flex;
    gap: var(--as-space-3);
    margin-top: var(--as-space-4);
    padding-top: var(--as-space-4);
    border-top: 1px solid var(--as-border);
}

.ec-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--as-radius-md);
    font-size: var(--as-text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.ec-action-btn.primary {
    background: var(--as-secondary);
    color: #fff;
}

.ec-action-btn.primary:hover {
    background: #00b088;
}

.ec-action-btn.secondary {
    background: var(--as-bg-primary);
    border: 1px solid var(--as-border);
    color: var(--as-text-secondary);
}

.ec-action-btn.secondary:hover {
    border-color: var(--as-primary);
    color: var(--as-primary);
}

/* Estimates Section */
.ec-estimates {
    margin-bottom: var(--as-space-6);
}

.ec-estimates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--as-space-4);
}

.ec-estimate-card {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    padding: var(--as-space-5);
}

.ec-estimate-label {
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--as-space-3);
}

.ec-estimate-values {
    display: flex;
    align-items: flex-end;
    gap: var(--as-space-4);
    margin-bottom: var(--as-space-2);
}

.ec-estimate-actual {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--as-text-primary);
    font-family: var(--as-font-mono, monospace);
    line-height: 1;
}

.ec-estimate-est {
    font-size: var(--as-text-sm);
    color: var(--as-text-muted);
}

.ec-estimate-est span {
    font-family: var(--as-font-mono, monospace);
}

/* Transcript Preview */
.ec-transcript-preview {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    padding: var(--as-space-5);
    margin-bottom: var(--as-space-6);
}

.ec-transcript-preview-title {
    font-size: var(--as-text-base);
    font-weight: 700;
    color: var(--as-text-primary);
    margin: 0 0 var(--as-space-3);
}

.ec-transcript-preview-text {
    font-size: var(--as-text-sm);
    color: var(--as-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--as-space-4);
}

.ec-transcript-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--as-primary);
    color: #fff;
    border-radius: var(--as-radius-md);
    font-size: var(--as-text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.ec-transcript-link:hover {
    background: #0055dd;
}

/* Related Events */
.ec-related {
    margin-bottom: var(--as-space-6);
}

.ec-related-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--as-text-primary);
    margin: 0 0 var(--as-space-4);
}

.ec-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--as-space-3);
}

.ec-related-card {
    display: block;
    padding: var(--as-space-4);
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    text-decoration: none;
    transition: all 0.2s;
}

.ec-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    border-color: var(--as-secondary);
}

.ec-related-card-meta {
    display: flex;
    align-items: center;
    gap: var(--as-space-2);
    margin-bottom: var(--as-space-2);
}

.ec-related-card-quarter {
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-secondary);
    font-family: var(--as-font-mono, monospace);
}

.ec-related-card-title {
    font-size: var(--as-text-sm);
    font-weight: 600;
    color: var(--as-text-primary);
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ec-related-card-date {
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
}

/* Sidebar Quick Facts */
.ec-quick-facts {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    overflow: hidden;
}

.ec-quick-facts-header {
    padding: var(--as-space-3) var(--as-space-4);
    background: linear-gradient(135deg, var(--as-secondary), #00a87a);
    color: #fff;
    font-size: var(--as-text-sm);
    font-weight: 700;
}

.ec-quick-facts-list {
    padding: var(--as-space-3) var(--as-space-4);
}

.ec-quick-fact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--as-space-2) 0;
    border-bottom: 1px solid var(--as-border);
}

.ec-quick-fact:last-child {
    border-bottom: none;
}

.ec-quick-fact-label {
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
}

.ec-quick-fact-value {
    font-size: var(--as-text-sm);
    font-weight: 600;
    color: var(--as-text-primary);
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.ec-empty {
    padding: var(--as-space-8);
    text-align: center;
    color: var(--as-text-muted);
    font-size: var(--as-text-sm);
}

.ec-empty-icon {
    display: block;
    margin: 0 auto var(--as-space-3);
    color: var(--as-text-tertiary);
}

/* ==========================================================================
   RESPONSIVE — 1024px
   ========================================================================== */
@media screen and (max-width: 1023px) {
    .ec-layout,
    .ec-single-layout {
        grid-template-columns: 1fr;
    }

    .ec-sidebar-sticky {
        position: static;
    }

    .ec-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--as-space-4);
    }

    .ec-sidebar > .newsletter-widget,
    .ec-sidebar > .sidebar-widget:first-child {
        grid-column: span 2;
    }

    .ec-week-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   RESPONSIVE — 768px
   ========================================================================== */
@media screen and (max-width: 767px) {
    .ec-filters {
        flex-direction: column;
    }

    .ec-filter-group {
        min-width: 100%;
    }

    .ec-event-card {
        grid-template-columns: auto 1fr;
    }

    .ec-event-right {
        grid-column: span 2;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .ec-week-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ec-estimates-grid {
        grid-template-columns: 1fr;
    }

    .ec-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ec-related-grid {
        grid-template-columns: 1fr;
    }

    .ec-sidebar {
        grid-template-columns: 1fr;
    }

    .ec-sidebar > .newsletter-widget,
    .ec-sidebar > .sidebar-widget:first-child {
        grid-column: span 1;
    }

    .ec-ad-placeholder[style*="950"] {
        width: 100% !important;
        height: auto !important;
        min-height: 60px;
    }

    .ec-ad-placeholder[style*="728"] {
        width: 468px !important;
        height: 60px !important;
    }
}

/* ==========================================================================
   RESPONSIVE — 480px
   ========================================================================== */
@media screen and (max-width: 479px) {
    .ec-calendar-day {
        aspect-ratio: auto;
        padding: 6px 2px;
        min-height: 40px;
    }

    .ec-day-number {
        font-size: var(--as-text-xs);
    }

    .ec-event-card {
        grid-template-columns: 1fr;
        gap: var(--as-space-2);
    }

    .ec-event-ticker {
        width: 40px;
        height: 40px;
        font-size: 0.625rem;
    }

    .ec-single-ticker-badge {
        width: 60px;
        height: 60px;
        font-size: 1rem;
    }

    .ec-week-grid {
        grid-template-columns: 1fr;
    }

    .ec-action-buttons {
        flex-direction: column;
    }

    .ec-ad-placeholder[style*="728"],
    .ec-ad-placeholder[style*="468"] {
        width: 320px !important;
        height: 50px !important;
    }
}

/* ==========================================================================
   NEW COMPONENTS — Earnings Calendar Redesign v2
   ========================================================================== */

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */

.ec-progress-bar-wrapper {
    margin-bottom: var(--as-space-4);
}

.ec-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
    margin-bottom: 6px;
}

.ec-progress-bar {
    height: 8px;
    background: var(--as-bg-primary);
    border-radius: 4px;
    overflow: hidden;
}

.ec-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--as-secondary), #00a87a);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ==========================================================================
   FILTER BAR (search + pills)
   ========================================================================== */

.ec-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--as-space-3);
    padding: var(--as-space-3) var(--as-space-4);
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    margin-bottom: var(--as-space-5);
    flex-wrap: wrap;
}

.ec-search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 180px;
    padding: 6px 12px;
    background: var(--as-bg-primary);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-md);
    color: var(--as-text-muted);
}

.ec-search-wrapper svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.ec-search-input {
    border: none;
    background: transparent;
    color: var(--as-text-primary);
    font-size: var(--as-text-sm);
    font-family: inherit;
    outline: none;
    width: 100%;
}

.ec-search-input::placeholder {
    color: var(--as-text-tertiary);
}

.ec-type-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ec-pill {
    padding: 5px 14px;
    border: 1px solid var(--as-border);
    border-radius: 999px;
    background: var(--as-bg-primary);
    color: var(--as-text-secondary);
    font-size: var(--as-text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.ec-pill:hover {
    border-color: var(--as-secondary);
    color: var(--as-secondary);
}

.ec-pill.active {
    background: var(--as-secondary);
    border-color: var(--as-secondary);
    color: #fff;
}

/* ==========================================================================
   TIMING GROUP HEADERS (BMO/AMC sections)
   ========================================================================== */

.ec-timing-group {
    margin-bottom: var(--as-space-5);
}

.ec-timing-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--as-space-2) 0;
    margin-bottom: var(--as-space-3);
    border-bottom: 1px solid var(--as-border);
}

.ec-timing-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ec-timing-label {
    font-size: var(--as-text-sm);
    font-weight: 700;
    color: var(--as-text-primary);
    flex: 1;
}

.ec-timing-count {
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-muted);
    background: var(--as-bg-primary);
    padding: 2px 8px;
    border-radius: 999px;
}

/* ==========================================================================
   EVENT CARD METRICS (inline EPS/Revenue on calendar page)
   ========================================================================== */

.ec-event-badge {
    flex-shrink: 0;
}

.ec-meta-ticker {
    font-weight: 700;
    color: var(--as-secondary);
    font-family: var(--as-font-mono, monospace);
}

.ec-event-metrics {
    display: flex;
    gap: var(--as-space-4);
    flex-shrink: 0;
}

.ec-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.ec-metric-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--as-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ec-metric-value {
    font-size: var(--as-text-sm);
    font-weight: 700;
    color: var(--as-text-primary);
    font-family: var(--as-font-mono, monospace);
}

.ec-metric-est {
    font-size: 0.625rem;
    color: var(--as-text-muted);
}

/* Updated event card for new layout with badge + metrics */
.ec-event-card {
    grid-template-columns: auto 1fr auto auto;
}

/* ==========================================================================
   UPCOMING EVENTS (sidebar)
   ========================================================================== */

.ec-upcoming-item {
    display: flex;
    align-items: center;
    gap: var(--as-space-2);
    padding: 8px 0;
    border-bottom: 1px solid var(--as-border);
    text-decoration: none;
    transition: background 0.15s;
}

.ec-upcoming-item:last-child {
    border-bottom: none;
}

.ec-upcoming-item:hover {
    background: rgba(0, 200, 150, 0.04);
}

.ec-upcoming-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.ec-upcoming-name {
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-upcoming-date {
    font-size: 0.6875rem;
    color: var(--as-text-muted);
}

/* ==========================================================================
   TICKER BADGE GRADIENT (from alphastreet_ticker_badge)
   ========================================================================== */

.ticker-badge-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
    color: #fff;
    font-family: var(--as-font-mono, monospace);
    letter-spacing: 0.5px;
    flex-shrink: 0;
    line-height: 1;
}

/* ==========================================================================
   SNAPSHOT HERO HEADER (single-earnings_event.php)
   ========================================================================== */

.ec-snapshot-hero {
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 50%, #0d2137 100%);
    padding: var(--as-space-6) 0 var(--as-space-8);
    margin-bottom: var(--as-space-6);
}

.ec-breadcrumb-light,
.ec-breadcrumb-light a,
.ec-breadcrumb-light .sep {
    color: rgba(255, 255, 255, 0.5);
}

.ec-breadcrumb-light a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.ec-breadcrumb-light .current {
    color: rgba(255, 255, 255, 0.7);
}

.ec-hero-content {
    display: flex;
    align-items: center;
    gap: var(--as-space-5);
    margin-top: var(--as-space-4);
}

.ec-hero-badge {
    flex-shrink: 0;
}

.ec-hero-info {
    flex: 1;
    min-width: 0;
}

.ec-hero-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 var(--as-space-2);
    line-height: 1.3;
}

.ec-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--as-space-3);
    font-size: var(--as-text-sm);
    color: rgba(255, 255, 255, 0.6);
}

.ec-hero-ticker-pill {
    display: inline-flex;
    padding: 3px 10px;
    background: var(--as-primary);
    border-radius: 4px;
    font-weight: 700;
    color: #fff;
    font-family: var(--as-font-mono, monospace);
    font-size: var(--as-text-xs);
}

.ec-hero-exchange {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.ec-hero-timing-pill {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-family: var(--as-font-mono, monospace);
    font-size: var(--as-text-xs);
}

.ec-hero-timing-pill.bmo {
    background: rgba(255, 140, 66, 0.2);
    color: #FF8C42;
}

.ec-hero-timing-pill.amc {
    background: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
}

.ec-hero-timing-pill.during_market {
    background: rgba(0, 200, 150, 0.2);
    color: #00C896;
}

.ec-hero-status {
    flex-shrink: 0;
}

.ec-hero-badge-lg {
    padding: 8px 20px !important;
    font-size: var(--as-text-sm) !important;
    border-radius: 8px !important;
}

/* ==========================================================================
   4-COLUMN METRICS GRID (snapshot page)
   ========================================================================== */

.ec-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--as-space-3);
    margin-bottom: var(--as-space-6);
}

.ec-metric-card {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    padding: var(--as-space-4);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.ec-metric-card.positive {
    border-color: rgba(0, 200, 150, 0.3);
    background: rgba(0, 200, 150, 0.04);
}

.ec-metric-card.negative {
    border-color: rgba(255, 59, 92, 0.3);
    background: rgba(255, 59, 92, 0.04);
}

.ec-metric-card-label {
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ec-metric-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--as-text-primary);
    font-family: var(--as-font-mono, monospace);
    line-height: 1.2;
}

.ec-metric-card.positive .ec-metric-card-value {
    color: var(--as-secondary);
}

.ec-metric-card.negative .ec-metric-card-value {
    color: #FF3B5C;
}

.ec-metric-card-sub {
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
}

/* ==========================================================================
   INVESTOR TOOLBOX GRID
   ========================================================================== */

.ec-toolbox-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--as-space-3);
}

.ec-toolbox-card {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    padding: var(--as-space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--as-space-2);
    transition: all 0.2s;
}

.ec-toolbox-card:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--as-secondary);
}

.ec-toolbox-card.disabled {
    opacity: 0.5;
}

.ec-toolbox-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--as-radius-lg);
}

.ec-toolbox-title {
    font-size: var(--as-text-sm);
    font-weight: 700;
    color: var(--as-text-primary);
    margin: 0;
}

.ec-toolbox-desc {
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
    margin: 0;
    line-height: 1.4;
}

.ec-toolbox-link {
    display: inline-flex;
    padding: 5px 14px;
    background: var(--as-primary);
    color: #fff;
    border-radius: var(--as-radius-md);
    font-size: var(--as-text-xs);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: auto;
}

.ec-toolbox-link:hover {
    background: #0055dd;
    color: #fff;
}

/* ==========================================================================
   YOUTUBE EMBED
   ========================================================================== */

.ec-youtube-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: var(--as-radius-lg);
}

.ec-youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   RELATED COVERAGE LIST
   ========================================================================== */

.ec-coverage-list {
    display: flex;
    flex-direction: column;
    gap: var(--as-space-2);
}

.ec-coverage-item {
    display: flex;
    align-items: center;
    gap: var(--as-space-3);
    padding: var(--as-space-3) var(--as-space-4);
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-md);
    text-decoration: none;
    transition: all 0.15s;
}

.ec-coverage-item:hover {
    border-color: var(--as-secondary);
    background: rgba(0, 200, 150, 0.03);
}

.ec-coverage-type-badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    white-space: nowrap;
}

.ec-coverage-title {
    font-size: var(--as-text-sm);
    font-weight: 600;
    color: var(--as-text-primary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-coverage-date {
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

/* ==========================================================================
   COMPANY FACTS TABLE (sidebar on snapshot page)
   ========================================================================== */

.ec-company-facts {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    overflow: hidden;
}

.ec-company-facts-header {
    padding: var(--as-space-3) var(--as-space-4);
    background: linear-gradient(135deg, var(--as-secondary), #00a87a);
    color: #fff;
    font-size: var(--as-text-sm);
    font-weight: 700;
}

.ec-company-facts-body {
    padding: var(--as-space-2) var(--as-space-4);
}

.ec-fact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--as-space-2) 0;
    border-bottom: 1px solid var(--as-border);
}

.ec-fact-row:last-child {
    border-bottom: none;
}

.ec-fact-label {
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
}

.ec-fact-value {
    font-size: var(--as-text-sm);
    font-weight: 600;
    color: var(--as-text-primary);
    text-align: right;
}

/* ==========================================================================
   ALSO REPORTING TODAY (sidebar on snapshot page)
   ========================================================================== */

.ec-also-reporting-item {
    display: flex;
    align-items: center;
    gap: var(--as-space-2);
    padding: 8px 0;
    border-bottom: 1px solid var(--as-border);
    text-decoration: none;
    transition: background 0.15s;
}

.ec-also-reporting-item:last-child {
    border-bottom: none;
}

.ec-also-reporting-item:hover {
    background: rgba(0, 200, 150, 0.04);
}

.ec-also-reporting-info {
    display: flex;
    align-items: center;
    gap: var(--as-space-2);
    flex: 1;
    min-width: 0;
}

.ec-also-reporting-name {
    font-size: var(--as-text-xs);
    font-weight: 600;
    color: var(--as-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* ==========================================================================
   SUBSCRIBE WIDGET (inline version for mobile)
   ========================================================================== */

.ec-subscribe-inline {
    margin-top: var(--as-space-6);
}

/* ==========================================================================
   INTERSTITIAL MODAL
   ========================================================================== */

.ec-interstitial-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-interstitial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.ec-interstitial-container {
    position: relative;
    z-index: 1;
    background: var(--as-bg-card);
    border-radius: var(--as-radius-lg);
    padding: var(--as-space-6);
    max-width: 750px;
    width: 90%;
    text-align: center;
}

.ec-interstitial-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--as-text-muted);
    cursor: pointer;
    line-height: 1;
}

.ec-interstitial-close:hover {
    color: var(--as-text-primary);
}

.ec-interstitial-ad {
    margin-bottom: var(--as-space-3);
}

.ec-interstitial-skip {
    font-size: var(--as-text-xs);
    color: var(--as-text-muted);
    margin: 0;
}

/* ==========================================================================
   RESPONSIVE — New components (1024px)
   ========================================================================== */
@media screen and (max-width: 1023px) {
    .ec-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ec-toolbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ec-hero-content {
        flex-wrap: wrap;
    }

    .ec-event-card {
        grid-template-columns: auto 1fr auto;
    }

    .ec-event-metrics {
        display: none;
    }
}

/* ==========================================================================
   RESPONSIVE — New components (768px)
   ========================================================================== */
@media screen and (max-width: 767px) {
    .ec-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ec-search-wrapper {
        min-width: 100%;
    }

    .ec-type-pills {
        justify-content: center;
    }

    .ec-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .ec-hero-meta {
        justify-content: center;
    }

    .ec-hero-status {
        margin-top: var(--as-space-2);
    }

    .ec-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ec-toolbox-grid {
        grid-template-columns: 1fr;
    }

    .ec-coverage-item {
        flex-wrap: wrap;
    }

    .ec-coverage-title {
        white-space: normal;
        order: 3;
        flex-basis: 100%;
    }

    .ec-interstitial-container {
        padding: var(--as-space-4);
    }
}

/* ==========================================================================
   RESPONSIVE — New components (480px)
   ========================================================================== */
@media screen and (max-width: 479px) {
    .ec-snapshot-hero {
        padding: var(--as-space-4) 0 var(--as-space-5);
    }

    .ec-metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--as-space-2);
    }

    .ec-metric-card-value {
        font-size: 1.125rem;
    }

    .ec-hero-title {
        font-size: 1.125rem;
    }

    .ec-toolbox-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--as-space-2);
    }

    .ec-toolbox-desc {
        display: none;
    }
}

/* ==========================================================================
   SCROLLABLE EVENTS CONTAINER
   ========================================================================== */

.ec-events-scroll-container {
    max-height: 630px;
    overflow-y: auto;
    padding-right: var(--as-space-2);
    margin-right: calc(var(--as-space-2) * -1);
}

/* Dark theme scrollbar */
.ec-events-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.ec-events-scroll-container::-webkit-scrollbar-track {
    background: var(--as-bg-primary);
    border-radius: 3px;
}

.ec-events-scroll-container::-webkit-scrollbar-thumb {
    background: var(--as-border);
    border-radius: 3px;
}

.ec-events-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--as-text-tertiary);
}

/* Firefox scrollbar */
.ec-events-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: var(--as-border) var(--as-bg-primary);
}

/* ==========================================================================
   BACK LINK (for date view)
   ========================================================================== */

.ec-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--as-text-sm);
    color: var(--as-text-muted);
    text-decoration: none;
    margin-bottom: var(--as-space-3);
    transition: color 0.15s;
}

.ec-back-link:hover {
    color: var(--as-secondary);
}

.ec-back-link svg {
    flex-shrink: 0;
}

/* ==========================================================================
   CALENDAR DAY TICKERS (replaces count)
   ========================================================================== */

.ec-calendar-day {
    aspect-ratio: auto;
    min-height: 72px;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6px;
}

.ec-day-tickers {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    width: 100%;
    overflow: hidden;
}

.ec-day-ticker {
    font-size: 9px;
    font-weight: 700;
    font-family: var(--as-font-mono, monospace);
    color: var(--as-text-secondary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-calendar-day.today .ec-day-ticker {
    color: rgba(255, 255, 255, 0.85);
}

.ec-day-more {
    font-size: 9px;
    font-weight: 700;
    color: var(--as-secondary);
    text-decoration: none;
    line-height: 1.2;
}

.ec-day-more:hover {
    text-decoration: underline;
}

.ec-calendar-day.today .ec-day-more {
    color: rgba(255, 255, 255, 0.9);
}

/* Selected date highlight */
.ec-calendar-day.selected {
    background: rgba(0, 200, 150, 0.15);
    border: 2px solid var(--as-secondary);
}

.ec-calendar-day.selected .ec-day-number {
    color: var(--as-secondary);
    font-weight: 700;
}

/* ==========================================================================
   RESPONSIVE — Calendar Tickers (1024px)
   ========================================================================== */
@media screen and (max-width: 1023px) {
    .ec-calendar-day {
        min-height: 64px;
    }

    .ec-day-tickers {
        max-height: 36px;
        overflow: hidden;
    }
}

/* ==========================================================================
   RESPONSIVE — Calendar Tickers (768px)
   ========================================================================== */
@media screen and (max-width: 767px) {
    .ec-calendar-day {
        min-height: 56px;
    }

    .ec-day-tickers {
        max-height: 28px;
    }

    .ec-day-ticker {
        font-size: 8px;
    }

    .ec-day-more {
        font-size: 8px;
    }
}

/* ==========================================================================
   RESPONSIVE — Calendar Tickers (480px)
   ========================================================================== */
@media screen and (max-width: 479px) {
    .ec-calendar-day {
        min-height: 48px;
        padding: 4px 2px;
    }

    .ec-day-tickers {
        max-height: 20px;
    }

    .ec-day-ticker {
        font-size: 7px;
    }

    .ec-day-more {
        font-size: 7px;
    }

    .ec-events-scroll-container {
        max-height: none;
        overflow-y: visible;
    }
}
