/**
 * Google Scholar Citation Plugin Styles - Google Scholar Design
 */

.block_google_scholar_citation {
    background: #ffffff;
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.citation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8eaed;
}

.block_google_scholar_citation .title {
    font-size: 20px;
    font-weight: 400;
    color: #202124;
    margin: 0;
}

.view-all-link {
    font-size: 14px;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Citation Table Styling */
.citation-table {
    margin: 20px 0;
}

.citation-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.citation-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    color: #5f6368;
    border-bottom: 1px solid #e8eaed;
    font-size: 14px;
}

.citation-table thead th.text-center {
    text-align: center;
}

.citation-table tbody tr {
    border-bottom: 1px solid #e8eaed;
}

.citation-table tbody tr:last-child {
    border-bottom: none;
}

.citation-table tbody td {
    padding: 12px 16px;
    color: #202124;
}

.citation-table .metric-label {
    font-weight: 400;
    color: #202124;
}

.citation-table .metric-value {
    font-weight: 400;
    color: #202124;
}

.citation-table .text-center {
    text-align: center;
}

/* Citation Chart Styling */
.citation-chart {
    margin: 30px 0 20px 0;
    padding-top: 20px;
}

.chart-container {
    position: relative;
    height: 200px;
    margin: 15px 0;
}

/* Last Updated Styling */
.last-updated {
    text-align: center;
    margin: 20px 0 0 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.last-updated small {
    color: #5f6368;
    font-size: 13px;
}

/* Responsive design */
@media (max-width: 768px) {
    .block_google_scholar_citation {
        padding: 16px;
    }
    
    .citation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .citation-table table {
        font-size: 13px;
    }
    
    .citation-table thead th,
    .citation-table tbody td {
        padding: 10px 8px;
    }
    
    .chart-container {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .citation-table thead th:first-child {
        width: 45%;
    }
    
    .citation-table thead th {
        font-size: 12px;
        padding: 8px 4px;
    }
    
    .citation-table tbody td {
        font-size: 12px;
        padding: 8px 4px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.block_google_scholar_citation {
    animation: fadeIn 0.5s ease-in;
}

/* RTL Support for Arabic and other RTL languages */
[dir="rtl"] .block_google_scholar_citation,
html[dir="rtl"] .block_google_scholar_citation,
.rtl .block_google_scholar_citation {
    direction: rtl;
}

[dir="rtl"] .citation-header,
html[dir="rtl"] .citation-header,
.rtl .citation-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .citation-table table,
html[dir="rtl"] .citation-table table,
.rtl .citation-table table {
    direction: rtl;
}

[dir="rtl"] .citation-table thead th,
html[dir="rtl"] .citation-table thead th,
.rtl .citation-table thead th {
    text-align: right;
}

[dir="rtl"] .citation-table thead th.text-center,
html[dir="rtl"] .citation-table thead th.text-center,
.rtl .citation-table thead th.text-center {
    text-align: center;
}

[dir="rtl"] .citation-table .text-center,
html[dir="rtl"] .citation-table .text-center,
.rtl .citation-table .text-center {
    text-align: center;
}

[dir="rtl"] .last-updated,
html[dir="rtl"] .last-updated,
.rtl .last-updated {
    direction: rtl;
}
