/**
 * Market Brief Pro - Frontend Styles
 * Minimal, fast, responsive CSS
 */

/* Widget Container */
.mbp-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Section Common Styles */
.mbp-calendar,
.mbp-agenda,
.mbp-tweet {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.mbp-calendar:last-child,
.mbp-agenda:last-child,
.mbp-tweet:last-child {
    margin-bottom: 0;
}

/* Section Titles */
.mbp-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f5;
}

/* Lists */
.mbp-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mbp-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f5;
}

.mbp-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mbp-list li:first-child {
    padding-top: 0;
}

/* Calendar Items */
.mbp-calendar-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.mbp-time {
    font-weight: 600;
    color: #4361ee;
    font-size: 0.95rem;
    min-width: 50px;
    font-variant-numeric: tabular-nums;
}

.mbp-country {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #495057;
    font-weight: 500;
}

.mbp-event {
    color: #1a1a2e;
    font-size: 0.95rem;
    flex: 1;
}

/* Agenda Items */
.mbp-agenda-item {
    padding-left: 16px !important;
    border-left: 3px solid #6b7280;
    transition: all 0.2s ease;
}

.mbp-agenda-item:hover {
    background: #f8f9fa;
    margin-left: -8px;
    padding-left: 24px !important;
}

.mbp-agenda-text {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Sentiment Colors */
.mbp-sentiment-positive {
    border-left-color: #22c55e !important;
}

.mbp-sentiment-positive .mbp-agenda-text::before {
    content: '📈 ';
}

.mbp-sentiment-negative {
    border-left-color: #ef4444 !important;
}

.mbp-sentiment-negative .mbp-agenda-text::before {
    content: '📉 ';
}

.mbp-sentiment-neutral {
    border-left-color: #6b7280 !important;
}

.mbp-sentiment-neutral .mbp-agenda-text::before {
    content: '📊 ';
}

/* Tweet Section */
.mbp-tweet-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
}

.mbp-tweet-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a2e;
    margin: 0 0 12px 0;
    word-wrap: break-word;
}

.mbp-tweet-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.mbp-char-count {
    font-size: 0.8rem;
    color: #6b7280;
}

.mbp-char-count.over-limit {
    color: #ef4444;
    font-weight: 600;
}

/* Share Button */
.mbp-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #000000;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 24px;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.mbp-share-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #ffffff !important;
    text-decoration: none !important;
}

.mbp-x-icon {
    width: 16px;
    height: 16px;
}

/* Empty State */
.mbp-empty {
    background: #f8f9fa;
}

.mbp-no-data {
    color: #6b7280;
    font-style: italic;
    margin: 0;
    text-align: center;
    padding: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {

    .mbp-calendar,
    .mbp-agenda,
    .mbp-tweet {
        padding: 16px;
        border-radius: 8px;
    }

    .mbp-calendar-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .mbp-time {
        min-width: auto;
    }

    .mbp-section-title {
        font-size: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {

    .mbp-calendar,
    .mbp-agenda,
    .mbp-tweet {
        background: #1a1a2e;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .mbp-section-title {
        color: #f0f0f5;
        border-bottom-color: #2d2d44;
    }

    .mbp-list li {
        border-bottom-color: #2d2d44;
    }

    .mbp-country {
        background: #2d2d44;
        color: #e0e0e0;
    }

    .mbp-event,
    .mbp-agenda-text,
    .mbp-tweet-text {
        color: #e0e0e0;
    }

    .mbp-tweet-content {
        background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
        border-color: #3d3d5c;
    }

    .mbp-empty {
        background: #2d2d44;
    }

    .mbp-no-data {
        color: #9ca3af;
    }

    .mbp-agenda-item:hover {
        background: #2d2d44;
    }
}