/**
 * Flavor Feed Frontend Styles
 *
 * @package FlavorFeed
 */

/* Article List Container */
.flavor-feed-list {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.flavor-feed-empty {
    text-align: center;
    padding: 40px 20px;
}

.flavor-feed-no-articles {
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Individual Article Item */
.flavor-feed-item {
    position: relative;
    margin-bottom: 30px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.flavor-feed-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Priority-based border colors */
.flavor-feed-item.priority-red {
    border-left: 4px solid #ef4444;
}

.flavor-feed-item.priority-yellow {
    border-left: 4px solid #f59e0b;
}

/* Priority Icon */
.flavor-feed-priority {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 24px;
    line-height: 1;
}

/* Title */
.flavor-feed-title {
    margin: 0 40px 12px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
}

.flavor-feed-item.priority-red .flavor-feed-title {
    color: #dc2626;
}

.flavor-feed-item.priority-yellow .flavor-feed-title {
    color: #d97706;
}

/* Meta Information */
.flavor-feed-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #6b7280;
}

.flavor-feed-meta > span {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 13px;
}

.flavor-feed-date {
    color: #374151;
}

.flavor-feed-topic {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 500;
}

.flavor-feed-audience {
    background: #e0f2fe;
    color: #0369a1;
}

/* Excerpt */
.flavor-feed-excerpt {
    margin: 16px 0;
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

.flavor-feed-excerpt p {
    margin: 0 0 12px 0;
}

.flavor-feed-excerpt p:last-child {
    margin-bottom: 0;
}

/* Link to Original */
.flavor-feed-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.flavor-feed-link:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

.flavor-feed-link:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

/* Widget-Specific Styles */
.widget .flavor-feed-list {
    margin: 0;
}

.widget .flavor-feed-item {
    padding: 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.widget .flavor-feed-title {
    font-size: 16px;
    margin: 0 30px 10px 0;
}

.widget .flavor-feed-priority {
    top: 16px;
    right: 16px;
    font-size: 18px;
}

.widget .flavor-feed-meta {
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
}

.widget .flavor-feed-meta > span {
    padding: 3px 8px;
    font-size: 11px;
}

.widget .flavor-feed-excerpt {
    font-size: 13px;
    line-height: 1.6;
}

.widget .flavor-feed-link {
    padding: 6px 12px;
    font-size: 13px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .flavor-feed-item {
        padding: 16px;
    }

    .flavor-feed-priority {
        top: 16px;
        right: 16px;
        font-size: 20px;
    }

    .flavor-feed-title {
        font-size: 18px;
        margin-right: 30px;
    }

    .flavor-feed-meta {
        flex-direction: column;
        gap: 8px;
    }

    .flavor-feed-excerpt {
        font-size: 14px;
    }
}

/* ========================================
   TEMPLATE: COMPACT
   ======================================== */

.flavor-feed-template-compact .flavor-feed-item {
    padding: 12px 16px;
    margin-bottom: 12px;
    border: none;
    border-left: 2px solid #e5e7eb;
    box-shadow: none;
}

.flavor-feed-template-compact .flavor-feed-item:hover {
    transform: none;
    box-shadow: none;
    background: #f9fafb;
}

.flavor-feed-template-compact .flavor-feed-title {
    display: inline;
    font-size: 16px;
    margin: 0;
    margin-right: 8px;
}

.flavor-feed-template-compact .flavor-feed-date {
    font-size: 13px;
    color: #6b7280;
    margin-right: 8px;
}

.flavor-feed-template-compact .flavor-feed-link-inline {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}

.flavor-feed-template-compact .flavor-feed-link-inline:hover {
    text-decoration: underline;
}

/* ========================================
   TEMPLATE: CARDS (Grid Layout)
   ======================================== */

.flavor-feed-template-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.flavor-feed-template-cards .flavor-feed-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.flavor-feed-template-cards .flavor-feed-title {
    font-size: 18px;
    flex-grow: 0;
}

.flavor-feed-template-cards .flavor-feed-topic {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.flavor-feed-template-cards .flavor-feed-excerpt {
    flex-grow: 1;
    font-size: 14px;
}

.flavor-feed-template-cards .flavor-feed-link {
    margin-top: auto;
}

/* ========================================
   TEMPLATE: LIST (Simple Bullet List)
   ======================================== */

.flavor-feed-template-list {
    padding: 0;
    margin: 20px 0 20px 20px;
    list-style: disc;
}

.flavor-feed-list-item {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 15px;
}

.flavor-feed-list-item strong {
    color: #1f2937;
}

.flavor-feed-priority-inline {
    margin-right: 4px;
}

.flavor-feed-date-inline {
    color: #6b7280;
    font-size: 14px;
}

.flavor-feed-link-inline {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.flavor-feed-link-inline:hover {
    text-decoration: underline;
}

/* ========================================
   TEMPLATE: NEWSLETTER
   ======================================== */

.flavor-feed-template-newsletter .flavor-feed-item {
    border: 2px solid #e5e7eb;
    border-left-width: 6px;
}

.flavor-feed-template-newsletter .flavor-feed-newsletter-priority {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.flavor-feed-template-newsletter .flavor-feed-priority-icon {
    font-size: 20px;
    line-height: 1;
}

.flavor-feed-template-newsletter .flavor-feed-priority-label {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flavor-feed-template-newsletter .priority-red .flavor-feed-priority-label {
    color: #dc2626;
}

.flavor-feed-template-newsletter .priority-yellow .flavor-feed-priority-label {
    color: #d97706;
}

.flavor-feed-template-newsletter .flavor-feed-title {
    margin: 0 0 12px 0;
    font-size: 22px;
}

.flavor-feed-template-newsletter .flavor-feed-newsletter-meta {
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    color: #4b5563;
}

.flavor-feed-template-newsletter .flavor-feed-topic-label,
.flavor-feed-template-newsletter .flavor-feed-audience-label {
    font-weight: 600;
    color: #1f2937;
}

.flavor-feed-template-newsletter .flavor-feed-topic,
.flavor-feed-template-newsletter .flavor-feed-audience {
    color: #0369a1;
    font-weight: 500;
}

.flavor-feed-template-newsletter .flavor-feed-date {
    color: #6b7280;
}

/* ========================================
   RESPONSIVE: TEMPLATES
   ======================================== */

@media screen and (max-width: 768px) {
    .flavor-feed-template-cards {
        grid-template-columns: 1fr;
    }

    .flavor-feed-template-newsletter .flavor-feed-newsletter-meta {
        font-size: 13px;
    }
}

/* ========================================
   PERSONAL DASHBOARD
   ======================================== */

/* Dashboard Container */
.flavor-feed-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Dashboard Header */
.flavor-feed-dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.flavor-feed-welcome {
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.flavor-feed-user-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 15px;
}

.flavor-feed-user-info span {
    display: inline-block;
}

.flavor-feed-user-info strong {
    margin-right: 6px;
    opacity: 0.9;
}

.flavor-feed-settings-link {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.flavor-feed-settings-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    text-decoration: none;
}

/* Filters */
.flavor-feed-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.flavor-feed-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flavor-feed-filter-group label {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin: 0;
}

.flavor-feed-priority-filter,
.flavor-feed-topic-filter {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #1f2937;
    min-width: 180px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.flavor-feed-priority-filter:hover,
.flavor-feed-topic-filter:hover {
    border-color: #9ca3af;
}

.flavor-feed-priority-filter:focus,
.flavor-feed-topic-filter:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-color: #3b82f6;
}

/* Articles Container */
.flavor-feed-articles-container {
    margin-bottom: 40px;
}

/* Priority Sections */
.flavor-feed-priority-section {
    margin-bottom: 40px;
}

.flavor-feed-section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #e5e7eb;
}

.flavor-feed-section-red .flavor-feed-section-title {
    color: #dc2626;
    border-bottom-color: #fecaca;
}

.flavor-feed-section-yellow .flavor-feed-section-title {
    color: #d97706;
    border-bottom-color: #fed7aa;
}

/* Dashboard Articles */
.flavor-feed-articles {
    display: grid;
    gap: 20px;
}

.flavor-feed-dashboard-article {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.flavor-feed-dashboard-article:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.flavor-feed-section-red .flavor-feed-dashboard-article {
    border-left: 4px solid #ef4444;
}

.flavor-feed-section-yellow .flavor-feed-dashboard-article {
    border-left: 4px solid #f59e0b;
}

.flavor-feed-article-header {
    margin-bottom: 16px;
}

.flavor-feed-article-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
}

.flavor-feed-section-red .flavor-feed-article-title {
    color: #dc2626;
}

.flavor-feed-section-yellow .flavor-feed-article-title {
    color: #d97706;
}

.flavor-feed-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.flavor-feed-topic-badge,
.flavor-feed-audience-badge,
.flavor-feed-date-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.flavor-feed-topic-badge {
    background: #dbeafe;
    color: #1e40af;
}

.flavor-feed-audience-badge {
    background: #e0f2fe;
    color: #0369a1;
}

.flavor-feed-date-badge {
    background: #f3f4f6;
    color: #6b7280;
}

.flavor-feed-article-excerpt {
    margin: 16px 0;
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

.flavor-feed-article-excerpt p {
    margin: 0 0 12px 0;
}

.flavor-feed-article-excerpt p:last-child {
    margin-bottom: 0;
}

.flavor-feed-article-link {
    display: inline-block;
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.flavor-feed-article-link:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

/* Messages */
.flavor-feed-message {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.flavor-feed-message p {
    font-size: 18px;
    color: #6b7280;
    margin: 0 0 20px 0;
}

.flavor-feed-login-button,
.flavor-feed-settings-button {
    display: inline-block;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.flavor-feed-login-button:hover,
.flavor-feed-settings-button:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

/* Loading State */
.flavor-feed-loading {
    text-align: center;
    padding: 40px 20px;
}

.flavor-feed-loading p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.flavor-feed-loading p::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Error State */
.flavor-feed-error {
    text-align: center;
    padding: 40px 20px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.flavor-feed-error p {
    font-size: 16px;
    color: #dc2626;
    margin: 0;
}

/* No Articles Message */
.flavor-feed-no-articles {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.flavor-feed-no-articles p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* Responsive Design - Dashboard */
@media screen and (max-width: 768px) {
    .flavor-feed-dashboard {
        padding: 15px;
    }

    .flavor-feed-dashboard-header {
        padding: 20px;
    }

    .flavor-feed-welcome {
        font-size: 22px;
    }

    .flavor-feed-user-info {
        flex-direction: column;
        gap: 8px;
        font-size: 14px;
    }

    .flavor-feed-filters {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .flavor-feed-filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .flavor-feed-priority-filter,
    .flavor-feed-topic-filter {
        width: 100%;
    }

    .flavor-feed-section-title {
        font-size: 20px;
    }

    .flavor-feed-dashboard-article {
        padding: 16px;
    }

    .flavor-feed-article-title {
        font-size: 18px;
    }

    .flavor-feed-article-meta {
        flex-direction: column;
        gap: 6px;
    }
}

/* Print Styles */
@media print {
    .flavor-feed-item {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .flavor-feed-item:hover {
        transform: none;
        box-shadow: none;
    }

    .flavor-feed-link {
        background: transparent;
        color: #000;
        text-decoration: underline;
        padding: 0;
    }

    .flavor-feed-template-cards {
        grid-template-columns: 1fr;
    }

    /* Dashboard Print Styles */
    .flavor-feed-dashboard-header {
        background: #f3f4f6;
        color: #000;
        border: 1px solid #d1d5db;
    }

    .flavor-feed-filters {
        display: none;
    }

    .flavor-feed-settings-link {
        display: none;
    }

    .flavor-feed-dashboard-article:hover {
        transform: none;
        box-shadow: none;
    }
}
