/**
 * Flavor Daily Widgets — Frontend Styles
 * Përdor CSS variables nga tema Flavor; degradon graciozisht në sajte të tjera.
 */

/* ─── Kontejneri kryesor ─── */
.fdw-calendar-widget,
.fdw-history-widget {
    font-family: var(--flavor-font-family, system-ui, -apple-system, sans-serif);
    color: var(--flavor-text-color, #222);
    line-height: 1.5;
}

.fdw-no-events {
    color: var(--flavor-muted-color, #888);
    font-style: italic;
    margin: 0;
    padding: 8px 0;
}

/* ─── Calendar Widget ─── */
.fdw-calendar-widget .fdw-day-block {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    border-left: 4px solid var(--flavor-accent-color, #c41e3a);
    background: var(--flavor-card-bg, #f9f9f9);
}

.fdw-calendar-widget .fdw-day-block.fdw-tomorrow {
    border-left-color: var(--flavor-secondary-color, #0c2340);
    opacity: 0.92;
}

.fdw-day-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.fdw-day-label {
    font-weight: 700;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--flavor-accent-color, #c41e3a);
}

.fdw-tomorrow .fdw-day-label {
    color: var(--flavor-secondary-color, #0c2340);
}

.fdw-day-date {
    font-size: 0.85em;
    color: var(--flavor-muted-color, #666);
}

.fdw-events-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fdw-event {
    padding: 6px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.fdw-event:last-child {
    border-bottom: none;
}

.fdw-event-flags {
    flex-shrink: 0;
}

.fdw-flag {
    font-size: 1.1em;
    display: inline-block;
}

.fdw-event-name {
    font-weight: 600;
    flex: 1;
    min-width: 0;
}

.fdw-event-note {
    display: block;
    width: 100%;
    font-size: 0.8em;
    color: var(--flavor-muted-color, #888);
    font-style: italic;
    margin-top: 2px;
}

/* ─── History Widget ─── */
.fdw-history-widget .fdw-history-date {
    font-size: 0.9em;
    color: var(--flavor-muted-color, #666);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.fdw-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fdw-history-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
}

.fdw-history-item:last-child {
    border-bottom: none;
}

.fdw-history-year {
    font-weight: 700;
    color: var(--flavor-accent-color, #c41e3a);
    font-variant-numeric: tabular-nums;
    align-self: start;
    background: rgba(196,30,58,0.08);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.fdw-history-title {
    font-weight: 600;
    color: var(--flavor-text-color, #222);
}

.fdw-history-excerpt {
    grid-column: 2;
    font-size: 0.88em;
    color: var(--flavor-muted-color, #555);
    margin-top: 4px;
    line-height: 1.45;
}

/* ─── Shortcode wrapper ─── */
.fdw-shortcode-wrap {
    margin: 1em 0;
}

/* ─── Përshtatje për ekran të vogël ─── */
@media (max-width: 480px) {
    .fdw-day-header {
        flex-direction: column;
        gap: 2px;
    }
    .fdw-history-item {
        grid-template-columns: 1fr;
    }
    .fdw-history-year {
        justify-self: start;
    }
    .fdw-history-excerpt {
        grid-column: 1;
    }
}
