/* University Senate Portal - Public Styles */

/* Session Details */
.usp-session-details {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.usp-session-info {
    margin-bottom: 20px;
}

.usp-session-info p {
    margin: 5px 0;
    font-size: 16px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.status-scheduled {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.status-in_progress {
    background: #e8f5e9;
    color: #388e3c;
}

.status-badge.status-completed {
    background: #f5f5f5;
    color: #616161;
}

.status-badge.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.status-badge.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.status-approved {
    background: #e8f5e9;
    color: #388e3c;
}

.status-badge.status-rejected {
    background: #ffebee;
    color: #c62828;
}

/* Agenda List */
.usp-session-agenda h3 {
    margin-top: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.usp-agenda-list {
    list-style: decimal;
    padding-left: 30px;
}

.usp-agenda-list li {
    margin: 10px 0;
    font-size: 16px;
}

.usp-agenda-list .item-type {
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Roll Call */
.usp-session-roll-call h3 {
    margin-top: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.usp-roll-call-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .usp-roll-call-columns {
        grid-template-columns: 1fr;
    }
}

.usp-roll-call-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.usp-roll-call-table th,
.usp-roll-call-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.usp-roll-call-table th {
    background: #f0f0f0;
    font-weight: bold;
}

.usp-roll-call-table .status-present {
    color: #2e7d32;
    font-weight: bold;
}

.usp-roll-call-table .status-absent {
    color: #c62828;
    font-weight: bold;
}

.usp-roll-call-table .status-excused {
    color: #f57c00;
    font-weight: bold;
}

.usp-roll-call-summary {
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* Agenda Item Details */
.usp-agenda-item-details {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.usp-item-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.usp-item-meta p {
    margin: 5px 0;
}

.usp-item-attachment {
    margin: 20px 0;
}

.usp-item-attachment .button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.usp-item-attachment .button:hover {
    background: #005177;
}

/* Progress Tracker */
.usp-item-progress h3 {
    margin-top: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.usp-progress-tracker-public {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    position: relative;
}

.usp-progress-tracker-public::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-stage {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.stage-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 20px;
    font-weight: bold;
}

.progress-stage.completed .stage-icon {
    background: #4caf50;
    color: #fff;
}

.progress-stage.current .stage-icon {
    background: #2196f3;
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.stage-label {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.stage-status {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .usp-progress-tracker-public {
        flex-direction: column;
        align-items: stretch;
    }

    .usp-progress-tracker-public::before {
        display: none;
    }

    .progress-stage {
        display: flex;
        align-items: center;
        text-align: left;
        margin-bottom: 15px;
    }

    .stage-icon {
        margin: 0 15px 0 0;
    }

    .stage-label {
        flex: 1;
    }
}

/* Voting Interface */
.usp-item-voting h3 {
    margin-top: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.usp-vote-interface {
    margin: 20px 0;
}

.usp-vote-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.usp-vote-btn {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.usp-vote-btn[data-vote="yes"] {
    background: #4caf50;
    color: #fff;
}

.usp-vote-btn[data-vote="yes"]:hover:not(:disabled) {
    background: #388e3c;
}

.usp-vote-btn[data-vote="no"] {
    background: #f44336;
    color: #fff;
}

.usp-vote-btn[data-vote="no"]:hover:not(:disabled) {
    background: #c62828;
}

.usp-vote-btn[data-vote="abstain"] {
    background: #9e9e9e;
    color: #fff;
}

.usp-vote-btn[data-vote="abstain"]:hover:not(:disabled) {
    background: #616161;
}

.usp-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.usp-vote-status {
    padding: 10px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    margin-top: 10px;
}

/* Vote Results */
.usp-vote-results {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.usp-vote-results h3 {
    margin-top: 0;
}

.usp-vote-bar {
    display: flex;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    margin: 20px 0;
}

.usp-vote-bar > div {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    transition: width 0.5s;
}

.usp-vote-bar-yes {
    background: #4caf50;
}

.usp-vote-bar-no {
    background: #f44336;
}

.usp-vote-bar-abstain {
    background: #9e9e9e;
}

.usp-vote-totals {
    margin: 15px 0;
    font-size: 16px;
}

.usp-vote-result {
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: bold;
    margin: 20px 0;
}

.usp-vote-result.passed {
    background: #e8f5e9;
    color: #2e7d32;
}

.usp-vote-result.failed {
    background: #ffebee;
    color: #c62828;
}

.usp-individual-votes h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.usp-votes-table {
    width: 100%;
    border-collapse: collapse;
}

.usp-votes-table th,
.usp-votes-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.usp-votes-table th {
    background: #f0f0f0;
    font-weight: bold;
}

.usp-votes-table .vote-yes {
    color: #2e7d32;
    font-weight: bold;
}

.usp-votes-table .vote-no {
    color: #c62828;
    font-weight: bold;
}

.usp-votes-table .vote-abstain {
    color: #616161;
    font-weight: bold;
}

/* Public Calendar */
.usp-public-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.usp-calendar-session {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.usp-calendar-session h4 {
    margin-top: 0;
    color: #1976d2;
}

.session-date {
    font-weight: bold;
    margin: 5px 0;
}

.session-time {
    color: #666;
    margin: 5px 0;
}

.usp-calendar-session details {
    margin: 15px 0;
}

.usp-calendar-session summary {
    cursor: pointer;
    font-weight: bold;
    color: #1976d2;
}

.usp-calendar-session ul {
    margin-top: 10px;
    padding-left: 20px;
}

.usp-calendar-session .button {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.usp-calendar-session .button:hover {
    background: #005177;
}

/* Senator Record */
.usp-senator-record {
    margin: 20px 0;
}

.usp-senator-record h3,
.usp-senator-record h4 {
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-top: 30px;
}

.usp-attendance-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.usp-attendance-table th,
.usp-attendance-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.usp-attendance-table th {
    background: #f0f0f0;
    font-weight: bold;
}

.usp-attendance-table .status-present {
    color: #2e7d32;
    font-weight: bold;
}

.usp-attendance-table .status-absent {
    color: #c62828;
    font-weight: bold;
}

.usp-attendance-table .status-excused {
    color: #f57c00;
    font-weight: bold;
}

/* Search Records */
.usp-search-records {
    margin: 20px 0;
}

.usp-search-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.search-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

@media (max-width: 768px) {
    .search-fields {
        grid-template-columns: 1fr;
    }
}

.usp-search-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
}

.search-fields select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-fields .button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.search-fields .button:hover {
    background: #005177;
}

.usp-results-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.usp-results-table th,
.usp-results-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.usp-results-table th {
    background: #f0f0f0;
    font-weight: bold;
}

.usp-results-table tr:hover {
    background: #f9f9f9;
}

/* All Agenda Items Grid */
.usp-all-agenda-items h2 {
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.usp-agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.usp-agenda-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.usp-agenda-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.usp-agenda-card .card-header {
    padding: 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.usp-agenda-card .card-header h3 {
    margin: 0;
    font-size: 18px;
    flex: 1;
}

.usp-agenda-card .card-header h3 a {
    color: #1976d2;
    text-decoration: none;
}

.usp-agenda-card .card-header h3 a:hover {
    text-decoration: underline;
}

.usp-agenda-card .card-meta {
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.usp-agenda-card .card-meta p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.usp-agenda-card .card-meta .voting-active {
    color: #4caf50;
    font-weight: bold;
}

.usp-agenda-card .card-excerpt {
    padding: 15px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.usp-agenda-card .card-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.usp-agenda-card .card-footer .button {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.usp-agenda-card .card-footer .button:hover {
    background: #005177;
}

@media (max-width: 768px) {
    .usp-agenda-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   LIVE VOTING DASHBOARD
   ======================================== */

/* Dashboard Container */
.usp-live-dashboard {
    background: #000;
    color: #fff;
    min-height: 100vh;
    padding: 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Full screen mode */
body.page-template-default .usp-live-dashboard {
    margin: -40px -40px 0 -40px;
}

/* Header */
.dashboard-header {
    text-align: center;
    padding: 30px 0 40px;
    border-bottom: 3px solid #333;
    margin-bottom: 40px;
}

.dashboard-title {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 4px;
    margin: 0 0 20px 0;
    color: #fff;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.session-status {
    font-size: 24px;
    font-weight: 600;
}

.status-live {
    color: #4caf50;
    animation: pulse-live 2s infinite;
}

.status-closed {
    color: #f44336;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Current Item */
.dashboard-item {
    text-align: center;
    padding: 40px;
    background: #111;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 2px solid #222;
}

.item-label {
    font-size: 20px;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.item-title {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 25px 0;
    color: #fff;
    line-height: 1.3;
}

.item-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.item-type,
.vote-requirement {
    font-size: 18px;
    padding: 8px 20px;
    background: #222;
    border-radius: 20px;
    color: #4caf50;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Vote Totals */
.dashboard-totals {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

@media (max-width: 1024px) {
    .dashboard-totals {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-totals {
        grid-template-columns: 1fr;
    }
}

.total-box {
    background: #111;
    border: 3px solid;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.total-box:hover {
    transform: scale(1.05);
}

.total-yes {
    border-color: #4caf50;
}

.total-no {
    border-color: #f44336;
}

.total-abstain {
    border-color: #999;
}

.total-all {
    border-color: #2196f3;
}

.total-label {
    font-size: 18px;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.total-count {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
}

.total-yes .total-count {
    color: #4caf50;
}

.total-no .total-count {
    color: #f44336;
}

.total-abstain .total-count {
    color: #999;
}

.total-all .total-count {
    color: #2196f3;
}

/* Senators Section */
.dashboard-senators {
    margin-bottom: 50px;
}

.senators-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 3px;
    text-align: center;
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

.senators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

@media (max-width: 600px) {
    .senators-grid {
        grid-template-columns: 1fr;
    }
}

/* Senator Cards */
.senator-card {
    background: #111;
    border: 3px solid #333;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

/* Vote States */
.senator-card.vote-yes {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.senator-card.vote-yes .senator-name {
    color: #4caf50;
    font-weight: 800;
}

.senator-card.vote-no {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.3);
}

.senator-card.vote-no .senator-name {
    color: #f44336;
    font-weight: 800;
}

.senator-card.vote-abstain {
    background: rgba(153, 153, 153, 0.1);
    border-color: #999;
}

.senator-card.vote-abstain .senator-name {
    color: #999;
}

.senator-card.vote-absent {
    background: #0a0a0a;
    border-color: #222;
}

.senator-card.vote-absent .senator-name {
    color: #666;
}

.senator-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.senator-status {
    font-size: 16px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-icon {
    font-size: 20px;
    font-weight: bold;
}

.vote-yes .status-icon {
    color: #4caf50;
}

.vote-no .status-icon {
    color: #f44336;
}

.vote-abstain .status-icon {
    color: #999;
}

/* Results Section */
.dashboard-results {
    margin-top: 50px;
    padding: 50px;
    text-align: center;
}

.results-announcement {
    background: #111;
    border: 5px solid;
    border-radius: 20px;
    padding: 60px;
    max-width: 800px;
    margin: 0 auto;
    animation: results-appear 0.5s ease-out;
}

@keyframes results-appear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.results-passed {
    border-color: #4caf50;
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.5);
}

.results-failed {
    border-color: #f44336;
    box-shadow: 0 0 40px rgba(244, 67, 54, 0.5);
}

.results-label {
    font-size: 24px;
    color: #888;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.results-verdict {
    font-size: 96px;
    font-weight: 900;
    letter-spacing: 8px;
    margin-bottom: 30px;
}

.results-passed .results-verdict {
    color: #4caf50;
    text-shadow: 0 0 30px rgba(76, 175, 80, 0.8);
}

.results-failed .results-verdict {
    color: #f44336;
    text-shadow: 0 0 30px rgba(244, 67, 54, 0.8);
}

.results-breakdown {
    font-size: 28px;
    color: #aaa;
    font-weight: 600;
}

/* No Vote State */
.dashboard-no-vote {
    text-align: center;
    padding: 100px 40px;
}

.dashboard-no-vote h1 {
    font-size: 64px;
    font-weight: 900;
    color: #333;
    margin-bottom: 30px;
    letter-spacing: 4px;
}

.dashboard-no-vote p {
    font-size: 32px;
    color: #666;
}

/* Animation for vote changes */
@keyframes vote-update {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.senator-card.vote-changed {
    animation: vote-update 0.5s ease-out;
}
