/**
 * Voting Records Importer - Frontend Styles
 */

/* Dashboard Single Page - Dark Theme */
.vri-dashboard-page {
    background: #0f1419;
    color: #e1e8ed;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.vri-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.vri-dashboard-header {
    background: #1a2332;
    padding: 20px 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.vri-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vri-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vri-logo h1 {
    margin: 0;
    font-size: 20px;
    color: #fff;
    font-weight: 600;
}

.vri-logo p {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #8899a6;
}

/* Filter Controls */
.vri-filter-controls {
    background: #1a2332;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    align-items: end;
}

.vri-filter-group label {
    display: block;
    font-size: 13px;
    color: #8899a6;
    margin-bottom: 8px;
    font-weight: 500;
}

.vri-filter-select {
    width: 100%;
    padding: 10px 12px;
    background: #0f1419;
    border: 1px solid #38444d;
    border-radius: 6px;
    color: #e1e8ed;
    font-size: 14px;
    cursor: pointer;
}

.vri-filter-select:focus {
    outline: none;
    border-color: #4A90E2;
}

.vri-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 0;
}

.vri-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Dashboard Grid */
.vri-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.vri-dashboard-left,
.vri-dashboard-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Cards */
.vri-card {
    background: #1a2332;
    border-radius: 8px;
    overflow: hidden;
}

.vri-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 25px;
    border-bottom: 1px solid #2c3e50;
}

.vri-card-header svg {
    color: #4A90E2;
}

.vri-card-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.vri-card-body {
    padding: 25px;
}

/* Member Info */
.vri-member-info,
.vri-party-details,
.vri-session-details {
    margin-bottom: 20px;
}

.vri-member-info h3,
.vri-party-name,
.vri-session-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.vri-member-meta {
    font-size: 13px;
    color: #8899a6;
    margin: 0;
}

.vri-member-meta span {
    margin-right: 5px;
}

/* Votes Table */
.vri-votes-table {
    width: 100%;
    border-collapse: collapse;
}

.vri-votes-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #8899a6;
    padding: 12px 8px;
    border-bottom: 1px solid #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vri-votes-table tbody td {
    padding: 12px 8px;
    border-bottom: 1px solid #2c3e50;
    font-size: 13px;
    color: #e1e8ed;
}

.vri-votes-table tbody tr:hover {
    background: rgba(74, 144, 226, 0.1);
    cursor: pointer;
}

.vri-votes-table .session-name {
    color: #fff;
    font-weight: 500;
}

/* Vote Badges */
.vri-vote-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.vote-yes,
.vri-vote-badge.vote-sim {
    background: #2ea22e;
    color: #fff;
}

.vote-no,
.vri-vote-badge.vote-não,
.vri-vote-badge.vote-nao {
    background: #d63638;
    color: #fff;
}

.vote-abstain {
    background: #f0b849;
    color: #333;
}

.vote-absent {
    background: #657786;
    color: #fff;
}

/* Sessions List */
.vri-sessions-list {
    max-height: 500px;
    overflow-y: auto;
}

.vri-sessions-list::-webkit-scrollbar {
    width: 8px;
}

.vri-sessions-list::-webkit-scrollbar-track {
    background: #0f1419;
}

.vri-sessions-list::-webkit-scrollbar-thumb {
    background: #38444d;
    border-radius: 4px;
}

.vri-session-item {
    padding: 15px;
    border-bottom: 1px solid #2c3e50;
    cursor: pointer;
    transition: background 0.2s;
}

.vri-session-item:hover {
    background: rgba(74, 144, 226, 0.1);
}

.vri-session-item.active {
    background: rgba(74, 144, 226, 0.2);
    border-left: 3px solid #4A90E2;
}

.vri-session-title {
    font-size: 14px;
    color: #fff;
    margin-bottom: 6px;
    font-weight: 500;
}

.vri-session-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #8899a6;
}

.vri-session-meta .badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.vri-session-meta .badge.important {
    background: #ff6b35;
    color: #fff;
}

/* Session Scoreboard */
.vri-session-date {
    font-size: 13px;
    color: #8899a6;
    margin: 0 0 15px 0;
}

.vri-vote-summary {
    display: flex;
    gap: 30px;
    margin: 15px 0;
}

.vri-vote-count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vri-vote-count .label {
    font-size: 14px;
    font-weight: 600;
}

.vri-vote-count .label.yes {
    color: #2ea22e;
}

.vri-vote-count .label.no {
    color: #d63638;
}

.vri-vote-count .value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

/* Progress Bar */
.vri-progress-bar-wrapper {
    margin: 20px 0;
}

.vri-progress-bar {
    display: flex;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: #0f1419;
}

.progress-yes,
.progress-no {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    transition: width 0.3s ease;
}

.progress-yes {
    background: #2ea22e;
}

.progress-no {
    background: #d63638;
}

.vri-total-votes {
    font-size: 13px;
    color: #8899a6;
    margin: 10px 0 0 0;
}

/* Party Members Votes */
.vri-party-members-votes {
    margin-top: 20px;
}

.vri-party-members-votes h4 {
    font-size: 11px;
    font-weight: 600;
    color: #8899a6;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Empty State */
.vri-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #657786;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .vri-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .vri-filter-controls {
        grid-template-columns: 1fr;
    }

    .vri-vote-summary {
        flex-direction: column;
        gap: 15px;
    }
}

/* General Styles */
.vri-sessions-list,
.vri-session-detail,
.vri-members-list,
.vri-member-page,
.vri-party-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filters */
.vri-filters-wrapper {
    margin-bottom: 20px;
}

.vri-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.vri-search-form {
    display: flex;
    gap: 10px;
}

.vri-search-input,
.vri-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.vri-search-input {
    min-width: 250px;
}

.vri-search-button {
    padding: 8px 16px;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.vri-search-button:hover {
    background-color: #135e96;
}

.vri-filter-select {
    min-width: 150px;
}

/* Tables */
.vri-table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.vri-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

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

.vri-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.vri-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Badges */
.vri-vote-badge,
.vri-party-badge,
.vri-result-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.vri-vote-badge {
    background-color: #f0f0f0;
    color: #333;
}

.vri-vote-yes {
    background-color: #2ea22e;
    color: #fff;
}

.vri-vote-no {
    background-color: #d63638;
    color: #fff;
}

.vri-vote-abstain {
    background-color: #f0b849;
    color: #333;
}

.vri-vote-absent {
    background-color: #999;
    color: #fff;
}

.vri-result-badge {
    font-weight: 600;
}

.vri-result-passed {
    background-color: #d4edda;
    color: #155724;
}

.vri-result-failed {
    background-color: #f8d7da;
    color: #721c24;
}

.vri-result-tied {
    background-color: #fff3cd;
    color: #856404;
}

.vri-party-badge {
    background-color: #e0e0e0;
    color: #333;
}

/* Statistics */
.vri-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.vri-stat-box {
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    text-align: center;
}

.vri-stat-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.vri-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.vri-stat-yes {
    border-left: 4px solid #2ea22e;
}

.vri-stat-no {
    border-left: 4px solid #d63638;
}

/* Party Breakdown */
.vri-party-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.vri-party-breakdown-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.vri-party-breakdown-item h4 {
    margin: 0 0 10px 0;
}

.vri-party-votes span {
    display: inline-block;
    margin-right: 15px;
    font-size: 14px;
}

/* Pagination */
.vri-pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.vri-page-link {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
    transition: all 0.2s;
}

.vri-page-link:hover {
    background: #f5f5f5;
    border-color: #999;
}

.vri-page-link.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.vri-page-dots {
    padding: 8px 12px;
    color: #999;
}

/* Export Buttons */
.vri-export-section {
    margin: 30px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 4px;
}

.vri-export-buttons {
    display: flex;
    gap: 10px;
}

.vri-export-btn {
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s;
}

.vri-export-btn:hover {
    background: #135e96;
}

/* Member/Party Headers */
.vri-member-header,
.vri-party-header,
.vri-session-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.vri-member-header h1,
.vri-party-header h1,
.vri-session-header h2 {
    margin: 0 0 15px 0;
}

.vri-member-meta,
.vri-session-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.vri-member-meta p,
.vri-session-meta span {
    margin: 5px 0;
}

.vri-member-bio,
.vri-party-description,
.vri-session-description {
    margin-top: 15px;
    line-height: 1.6;
    color: #666;
}

/* Member Cards */
.vri-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.vri-member-card {
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: box-shadow 0.2s;
}

.vri-member-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vri-member-card h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.vri-member-district {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Cohesion */
.vri-cohesion-list {
    max-width: 600px;
}

.vri-cohesion-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.vri-cohesion-session {
    flex: 1;
    font-size: 14px;
}

.vri-cohesion-value {
    font-weight: 600;
    color: #2271b1;
}

/* No Results */
.vri-no-results {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

/* Links */
.vri-member-link,
.vri-party-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.vri-member-link:hover,
.vri-party-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .vri-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .vri-search-input,
    .vri-filter-select {
        width: 100%;
        min-width: auto;
    }

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

    .vri-member-meta,
    .vri-session-meta {
        flex-direction: column;
        gap: 10px;
    }

    .vri-table {
        font-size: 13px;
    }

    .vri-table th,
    .vri-table td {
        padding: 8px;
    }
}