/* VECTOR Economy Simulator — Public Shortcode Styles */

.vector-public-dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vector-public-dashboard h2 {
    margin-bottom: 4px;
}

.vector-public-description {
    color: #666;
    margin-bottom: 20px;
}

/* Status */
.vector-public-status {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #0d6efd;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 14px;
}

/* Sections */
.vector-public-section {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

.vector-public-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Rates table */
.vector-public-section h3 small {
    font-weight: 400;
    font-size: 13px;
    color: #888;
    margin-left: 6px;
}

.vector-pub-rates-table {
    margin-top: 10px;
    font-variant-numeric: tabular-nums;
}

.vector-pub-rates-table td,
.vector-pub-rates-table th {
    text-align: right;
}

.vector-pub-rates-table td:first-child,
.vector-pub-rates-table th:first-child {
    text-align: left;
}

.vector-pub-rate-row-stress {
    background: #fff5f5 !important;
}

.vector-pub-rate-row-good {
    background: #f0fff4 !important;
}

.vector-pub-rates-total-row {
    background: #f0f6fc !important;
    border-top: 2px solid #0d6efd;
}

.vector-pub-rates-total-row td {
    font-size: 14px;
}

.vector-pub-rates-balance-row {
    border-top: 1px solid #dee2e6;
}

.vector-pub-rates-balance-row td {
    font-size: 14px;
}

.vector-pub-rates-surplus {
    background: #f0fff4 !important;
}

.vector-pub-rates-surplus td {
    color: #155724;
}

.vector-pub-rates-deficit {
    background: #fff5f5 !important;
}

.vector-pub-rates-deficit td {
    color: #721c24;
}

/* Chart */
.vector-public-chart-container {
    position: relative;
    width: 100%;
    max-height: 400px;
}

/* Tables */
.vector-public-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.vector-public-table th,
.vector-public-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.vector-public-table th {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.vector-public-table tbody tr:hover {
    background: #f8f9fa;
}

/* Pagination */
.vector-public-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 12px;
}

.vector-public-pagination button {
    min-width: 36px;
    padding: 6px 10px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.vector-public-pagination button.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.vector-public-pagination button:hover:not(.active) {
    background: #ddd;
}

/* UDI link in agent table */
.vector-pub-udi-link {
    color: #dc3545;
    cursor: pointer;
    text-decoration: underline;
    font-size: 12px;
    margin-left: 6px;
}

.vector-pub-udi-link:hover {
    color: #a71d2a;
}

/* Details link */
.vector-pub-details-link {
    color: #0d6efd;
    cursor: pointer;
    text-decoration: underline;
}

.vector-pub-details-link:hover {
    color: #0a58ca;
}

/* Modal */
.vector-pub-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vector-pub-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.vector-pub-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.vector-pub-modal-header h3 {
    margin: 0;
    border: none;
    padding: 0;
}

.vector-pub-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.vector-pub-modal-close:hover {
    color: #dc3545;
}

.vector-pub-modal-body {
    padding: 20px;
}

.vector-pub-modal-body p {
    margin: 4px 0;
    font-size: 14px;
}

.vector-pub-radar-container {
    max-width: 420px;
    margin: 16px auto 0;
}

/* Agent link */
.vector-pub-agent-link {
    color: #0d6efd;
    cursor: pointer;
    text-decoration: underline;
}

.vector-pub-agent-link:hover {
    color: #0a58ca;
}

/* Wide modal for agent ledger */
.vector-pub-modal-wide {
    max-width: 800px;
}

/* Agent summary layout */
.vector-pub-agent-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.vector-pub-agent-info {
    flex: 1;
    min-width: 200px;
}

.vector-pub-agent-info p {
    margin: 4px 0;
    font-size: 14px;
}

.vector-pub-agent-stock {
    flex: 2;
    min-width: 300px;
}

.vector-pub-agent-stock h4 {
    margin: 0 0 8px;
    font-size: 13px;
}

.vector-pub-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 6px;
}

.vector-pub-stock-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 12px;
    text-align: center;
}

.vector-pub-stock-item-name {
    font-weight: 600;
    color: #666;
    font-size: 11px;
}

.vector-pub-stock-item-value {
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Direction badges */
.vector-pub-dir-sent {
    color: #dc3545;
    font-weight: 600;
}

.vector-pub-dir-received {
    color: #28a745;
    font-weight: 600;
}
