/* Research Dashboard Styles */

.rd-wrap {
    margin: 20px 0;
}

.rd-wrap h1 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

/* Grid layouts */
.rd-grid {
    display: grid;
    gap: 20px;
}

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

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

.rd-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1600px) {
    .rd-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1400px) {
    .rd-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1100px) {
    .rd-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1000px) {
    .rd-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .rd-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .rd-grid-5 {
        grid-template-columns: 1fr;
    }
}

/* Card styles */
.rd-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rd-card-title {
    background: #f8f9fa;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    color: #333;
}

.rd-card-body {
    padding: 15px;
    max-height: 600px;
    overflow-y: auto;
}

/* Feed items */
.feed-item {
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #eee;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.feed-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.1);
}

.feed-item:last-child {
    margin-bottom: 0;
}

/* Freshness colors */
.feed-item.fresh-green {
    background: #d1fae5;
    border-color: #a7f3d0;
}

.feed-item.fresh-blue {
    background: #dbeafe;
    border-color: #bfdbfe;
}

/* Google Trends specific */
.feed-title {
    font-size: 16px;
    font-weight: 700;
    color: #d97706;
    margin-bottom: 6px;
    line-height: 1.4;
}

.feed-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 13px;
    color: #555;
}

.feed-item .related {
    margin-top: 8px;
    font-size: 13px;
}

.feed-item .related a {
    display: block;
    font-weight: normal;
    color: #2563eb;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.4;
}

.feed-item .related a:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

/* Standard feed links */
.feed-item a {
    font-size: 15px;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
    line-height: 1.5;
}

.feed-item a:hover {
    text-decoration: underline;
    color: #005177;
}

/* Feed descriptions */
.feed-item .desc {
    margin-top: 4px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

.feed-item .date {
    margin-top: 4px;
    font-size: 13px;
    color: #777;
}

/* Empty state */
.rd-card-body p {
    margin: 0;
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Scrollbar styling for card bodies */
.rd-card-body::-webkit-scrollbar {
    width: 8px;
}

.rd-card-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.rd-card-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.rd-card-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading state */
.rd-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.rd-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}