/**
 * EAP Widget Styles v1.1.0
 * Стили для виджета Рынок Зерна
 */

.eap-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.eap-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #4CAF50;
}

/* Содержание */
.eap-toc {
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.eap-toc strong {
    margin-right: 8px;
}

.eap-toc a {
    background: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #4CAF50;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.eap-toc a:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Endpoint badge */
.eap-endpoint {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    margin-bottom: 16px;
}

/* Секции */
.eap-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.eap-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.eap-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #444;
    margin: 16px 0 8px 0;
}

.eap-section h4 small {
    font-weight: normal;
    color: #888;
}

/* Бейдж */
.eap-badge {
    background: #4CAF50;
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Статистика */
.eap-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.eap-stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.eap-stat-card:hover {
    transform: translateY(-2px);
}

.eap-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 6px;
}

.eap-stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Таблицы */
.eap-table-wrapper {
    overflow-x: auto;
}

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

.eap-table th,
.eap-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.eap-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    font-size: 13px;
}

.eap-table tbody tr:hover {
    background: #fafafa;
}

.eap-table td strong {
    color: #1a1a1a;
}

.eap-table code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.eap-table a {
    color: #4CAF50;
    text-decoration: none;
}

.eap-table a:hover {
    text-decoration: underline;
}

/* Статусы */
.eap-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.eap-status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.eap-status-waiting {
    background: #fff3e0;
    color: #ef6c00;
}

.eap-status-completed {
    background: #e3f2fd;
    color: #1565c0;
}

.eap-status-closed {
    background: #f5f5f5;
    color: #757575;
}

.eap-status-draft {
    background: #fce4ec;
    color: #c2185b;
}

/* Свойства аукциона */
.eap-properties {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.eap-property {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.eap-property strong {
    color: #2e7d32;
}

/* Категории */
.eap-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.eap-category-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #4CAF50;
}

.eap-category-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.eap-category-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eap-category-card li {
    font-size: 13px;
    color: #555;
    padding: 3px 0;
}

.eap-category-card li small {
    color: #888;
}

/* Слайдер */
.eap-slides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.eap-slide-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.eap-slide-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.eap-slide-info {
    background: #f8f9fa;
    padding: 10px 14px;
    font-size: 13px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.eap-slide-info a {
    color: #4CAF50;
    text-decoration: none;
}

/* Новости */
.eap-news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eap-news-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid #4CAF50;
}

.eap-news-photo {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.eap-news-content {
    flex: 1;
}

.eap-news-date {
    font-size: 12px;
    color: #888;
}

.eap-news-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 6px 0;
}

.eap-news-item p {
    font-size: 13px;
    color: #555;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.eap-news-item small {
    color: #888;
    font-size: 11px;
}

/* Теги */
.eap-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.eap-tag {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
}

.eap-tag small {
    color: #66bb6a;
    margin-left: 4px;
}

/* Логистика */
.eap-logistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.eap-logistics-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.eap-logistics-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.eap-logistics-card .eap-endpoint {
    margin-bottom: 12px;
}

.eap-logistics-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eap-logistics-card li {
    font-size: 13px;
    color: #555;
    padding: 4px 0;
}

.eap-logistics-card li small {
    color: #888;
}

/* Регионы */
.eap-regions-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.eap-regions-examples h4 {
    font-size: 14px;
    color: #555;
    margin: 0 0 10px 0;
}

.eap-regions-examples ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eap-regions-examples li {
    font-size: 13px;
    color: #333;
    padding: 4px 0;
}

.eap-regions-examples li small {
    color: #888;
}

/* Пустые состояния и ошибки */
.eap-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 15px;
}

.eap-error {
    background: #ffebee;
    color: #c62828;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

/* Футер */
.eap-footer {
    text-align: center;
    padding: 20px;
    color: #888;
}

.eap-footer a {
    color: #4CAF50;
    text-decoration: none;
}

.eap-footer a:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
    .eap-dashboard {
        padding: 10px;
    }

    .eap-title {
        font-size: 22px;
    }

    .eap-toc {
        padding: 12px;
    }

    .eap-toc a {
        font-size: 12px;
        padding: 3px 8px;
    }

    .eap-section {
        padding: 16px;
    }

    .eap-stat-value {
        font-size: 22px;
    }

    .eap-table th,
    .eap-table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    .eap-news-item {
        flex-direction: column;
    }

    .eap-news-photo {
        width: 100%;
        height: 150px;
    }

    .eap-slide-card img {
        height: 140px;
    }
}
