/* Community Board voting dashboard styles.
   Loaded after Bootstrap so these rules take precedence where they overlap. */

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 95%;
    margin: 0 auto;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-wrap: wrap;
}

.left-section {
    flex: 1;
    padding-right: 20px;
}

.right-section {
    flex: 1;
    padding-left: 20px;
    text-align: center;
}

.banner {
    background-color: #0073e6;
    color: #fff;
    padding: 5px;
    text-align: center;
}

h1 {
    font-size: 24px;
    text-align: center;
    color: #333;
}

.results {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.vote-count {
    display: flex;
    text-align: center;
    font-size: 30px;
}

.result-item {
    margin-right: 20px; /* Adjust the margin as needed for spacing */
    display: flex;
    align-items: center;
}

.label {
    font-weight: bold;
    margin-right: 5px;
}

.log {
    margin: 20px 0;
}

/* Shared box style for the two right-column panels (timer + speaker queue) */
.side-panel {
    margin: 20px 0;
    border: 2px solid #0073e6;
    padding: 20px;
    text-align: center;
}

.side-panel-title {
    font-size: 18px;
    font-weight: bold;
}

#timerDisplay {
    font-size: 24px;
    font-weight: bold;
}

#timerButtons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#setTimeInput {
    width: 100px; /* Wider input to accommodate the new format */
    font-size: 16px;
}

#queueText {
    font-style: italic;
}

#votingControlsContainer {
    display: flex;
    align-items: center;
}

#stopButton {
    margin-right: 20px; /* Adjust the margin as needed for spacing */
}

#manualEntryContainer {
    display: flex;
    align-items: center;
}

#nameDropdown,
#voteDropdown {
    margin-right: 10px; /* Adjust the margin as needed for spacing */
}

.voting-controls {
    margin-top: 20px;
    /* Stack Vote Type / Candidates / Title / Start Voting vertically instead of
       inheriting the row-flex layout from the outer .container class. */
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.vote-type-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voting-title-input {
    width: 200px;
    font-size: 16px;
}

.seconds-since-update {
    font-size: 8px;
    color: #888;
}

.wide-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    font-size: 14px;
}

.wide-list li {
    flex: 0 0 calc(15% - 10px);
    margin-right: 5px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 0px;
    margin-bottom: 5px;
}

.stop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.9); /* Red background with some transparency */
    display: none;
    z-index: 999; /* Make sure it's above other elements */
}

.stop-message {
    text-align: center;
    font-size: 250px; /* Adjust the font size as needed */
    color: white; /* White text color */
    padding: 20px;
}

.warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(208, 255, 0, 0.9); /* Red background with some transparency */
    display: none;
    z-index: 999; /* Make sure it's above other elements */
}

.warning-message {
    text-align: center;
    font-size: 250px; /* Adjust the font size as needed */
    color: white; /* White text color */
    padding: 20px;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    margin: 5px 0;
}

.dropdown-menu {
    min-width: 200px;
}

.dropdown-item {
    padding: 8px 20px;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Banner content: message + right-aligned action buttons */
.banner-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.banner-message {
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.banner-actions {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

/* Hand-rolled modals (shown/hidden via style.display in JS, not Bootstrap's JS component) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-dialog {
    position: relative;
    width: 80%;
    max-width: 800px;
    margin: 50px auto;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.btn-close {
    cursor: pointer;
    border: none;
    background: none;
    font-size: 20px;
}

.modal-footer {
    margin-top: 15px;
    text-align: right;
}

.modal-footer .btn {
    margin-left: 10px;
}

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

.modal-body {
    max-height: 70vh; /* 70% of viewport height */
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 15px;
}

/* Ensure the table header stays fixed while scrolling */
.table thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}
