/* ================================
   VOTING MODULE STYLES
   ================================ */

.voting-container {
    max-width: 900px;
}

/* Auth Page */
.voting-auth-box {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    margin: 30px auto;
    max-width: 450px;
    text-align: center;
}

.voting-auth-box h2 {
    color: #333;
    font-size: 20px;
    margin: 0 0 10px;
}

.voting-auth-box p {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px;
}

.voting-auth-box .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.voting-auth-box .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.voting-auth-box input[type="email"],
.voting-auth-box input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.voting-auth-box input:focus {
    border-color: #0073aa;
    outline: none;
}

#otp-code {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 600;
}

.auth-message {
    margin-top: 15px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
}

.auth-link {
    margin-top: 15px;
    font-size: 13px;
}

.auth-link a {
    color: #0073aa;
}

.voting-auth-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 14px;
}

.voting-auth-footer a {
    color: #0073aa;
    text-decoration: none;
}

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

/* Buttons */
.voting-container .btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.voting-container .btn-primary:hover {
    background: #005a87;
}

.voting-container .btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Voting Cards */
.voting-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.voting-card-header {
    background: #f7f7f7;
    padding: 16px 24px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.voting-card-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.division-label {
    background: #0073aa;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Submitted state */
.voting-submitted {
    padding: 24px;
    background: #f0f9f0;
    border-left: 4px solid #46b450;
}

.voting-submitted p {
    margin: 0 0 10px;
    color: #333;
}

.voting-submitted ul {
    margin: 0;
    padding: 0 0 0 20px;
}

.voting-submitted li {
    margin-bottom: 6px;
    color: #555;
}

.voting-notice {
    padding: 24px;
    background: #fff8e5;
    border-left: 4px solid #ffb900;
}

.voting-notice p {
    margin: 0;
    color: #666;
}

/* Messages */
.form-message {
    margin-top: 15px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
}

.msg-success {
    background: #f0f9f0;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.msg-error {
    background: #fef0f0;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Nomination Form */
.nomination-form {
    padding: 24px;
}

.nomination-slots {
    margin-bottom: 20px;
}

.nomination-slot {
    margin-bottom: 16px;
}

.nomination-slot label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.nomination-slot select,
.nomination-slot input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.nomination-slot select:focus,
.nomination-slot input:focus {
    border-color: #0073aa;
    outline: none;
}

.add-in-name {
    margin-top: 8px;
}

.nomination-comment-field {
    margin-top: 16px;
}

.nomination-comment-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.nomination-comment-field .optional-label {
    font-weight: 400;
    color: #999;
    font-size: 12px;
}

.nomination-comment {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.nomination-comment:focus {
    border-color: #0073aa;
    outline: none;
}

.nomination-comment-display {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
}

.nomination-comment-display p {
    margin: 4px 0 0;
    color: #555;
}

.voting-locked-notice {
    margin-top: 10px;
    color: #999;
    font-size: 13px;
}

/* ================================
   HUB CARDS
   ================================ */

/* Section grouping */
.hub-section {
    margin-top: 28px;
}

.hub-section--closed {
    margin-top: 36px;
}

.hub-section__heading {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #1e7e34;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e6f4ea;
}

.hub-section__heading--closed {
    color: #999;
    border-bottom-color: #eee;
}

.hub-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.hub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

a.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,115,170,0.15);
    border-color: #0073aa;
}

.hub-card--locked {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.hub-card--complete {
    border-color: #46b450;
}

a.hub-card--complete:hover {
    border-color: #3a9a42;
    box-shadow: 0 8px 24px rgba(70,180,80,0.15);
}

/* Background graphic area */
.hub-card__graphic {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hub-card__graphic svg {
    width: 100px;
    height: 100px;
}

.hub-card__graphic--nominate {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4ecfb 100%);
    color: #0073aa;
}

.hub-card__graphic--vote {
    background: linear-gradient(135deg, #fef8e7 0%, #fdf0c8 100%);
    color: #b38600;
}

.hub-card__graphic--coty {
    background: linear-gradient(135deg, #eef7ee 0%, #d9f0d9 100%);
    color: #2e7d32;
}

.hub-card--locked .hub-card__graphic {
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    color: #aaa;
}

/* Card body */
.hub-card__body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hub-card__step {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 6px;
}

.hub-card__title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    margin: 0 0 6px;
}

a.hub-card:hover .hub-card__title {
    color: #0073aa;
}

.hub-card__desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 14px;
    line-height: 1.45;
    flex: 1;
}

/* Footer badges */
.hub-card__footer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.hub-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.5;
}

.hub-badge--open {
    background: #e6f4ea;
    color: #1e7e34;
}

.hub-badge--closed {
    background: #f5f5f5;
    color: #999;
}

.hub-badge--done {
    background: #e6f4ea;
    color: #1e7e34;
}

.hub-badge--progress {
    background: #fff3cd;
    color: #856404;
}

.hub-badge--neutral {
    background: #f5f5f5;
    color: #999;
}

/* Completion check */
.hub-card__check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: #46b450;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-card__check svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

/* Responsive: stack on smaller screens */
@media (max-width: 900px) {
    .hub-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hub-card__graphic {
        height: 90px;
    }
}

/* Legacy badge support */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.badge-open {
    background: #e6f4ea;
    color: #1e7e34;
}

.badge-closed {
    background: #f5f5f5;
    color: #999;
}

/* All-Star Voting */
.allstar-vote-form {
    padding: 24px;
}

.selection-counter {
    background: #f0f8ff;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #0073aa;
}

.selection-counter .count {
    font-size: 18px;
}

.team-nominees {
    margin-bottom: 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #eee;
}

.team-nominees.own-team {
    border-color: #0073aa;
    background: #f0f8ff;
}

.team-nominees h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #333;
}

.own-badge {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.nominee-checkbox {
    display: block;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.nominee-checkbox:hover {
    background: #e8f4fd;
}

.nominee-checkbox input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.nominee-checkbox input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.nominee-checkbox input[type="checkbox"]:disabled + .player-name {
    opacity: 0.5;
}

.team-tag {
    display: inline-block;
    background: #eee;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 6px;
}

/* COTY Voting */
.coty-vote-form {
    padding: 24px;
}

.coty-vote-form .form-group {
    margin-bottom: 20px;
}

.coty-vote-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.coty-vote-form select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.coty-vote-form select:focus {
    border-color: #0073aa;
    outline: none;
}

.coty-results-preview {
    margin-top: 10px;
}

.coty-results-preview .result-row {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.coty-results-preview .result-row:last-child {
    border-bottom: none;
}

.coty-results-preview .place {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.coty-results-preview .coach-name {
    color: #555;
}

/* Admin Page */
.voting-admin {
    max-width: 1400px !important;
}

.voting-admin .phase-controls {
    padding: 24px;
}

/* Division filter bar */
.division-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.div-filter-btn {
    padding: 6px 14px;
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.div-filter-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.div-filter-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.filter-count {
    font-size: 10px;
    opacity: 0.75;
}

.phase-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.phase-toggle:last-child {
    border-bottom: none;
}

.phase-toggle label {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.phase-toggle input[type="checkbox"] {
    transform: scale(1.3);
}

.phase-status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    background: #f5f5f5;
    color: #999;
}

.phase-status.open {
    background: #e6f4ea;
    color: #1e7e34;
}

/* Results tabs */
.results-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.tab-btn:hover {
    color: #0073aa;
}

.results-panel {
    padding: 24px;
}

.result-division {
    margin-bottom: 24px;
}

.result-division h3 {
    color: #333;
    font-size: 16px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

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

.results-table th {
    background: #f7f7f7;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e0e0e0;
    color: #555;
    font-weight: 600;
}

.results-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    color: #333;
}

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

.results-table .allstar-selected {
    background: #f0f9f0;
}

.results-table .allstar-selected td {
    font-weight: 500;
}

/* Admin Reporting */
.division-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.division-header-row h3 {
    margin: 0;
    border: none;
    padding: 0;
}

.summary-count {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #f0f0f0;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 10px;
    vertical-align: middle;
}

.missing-section {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fff8e5;
    border-left: 3px solid #ffb900;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.missing-section strong {
    color: #333;
}

.muted {
    color: #aaa;
    font-style: italic;
}

.comment-cell {
    max-width: 200px;
    font-size: 13px;
    color: #555;
}

.no-data {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Not-submitted rows */
.row-not-submitted {
    background: #f9f9f9;
}

.row-not-submitted td {
    color: #aaa;
}

.status-not-submitted {
    display: inline-block;
    padding: 2px 10px;
    background: #f0f0f0;
    color: #999;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Clear buttons */
.btn-clear {
    background: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-clear:hover {
    background: #dc3545;
    color: #fff;
}

.btn-clear:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-clear-sm {
    padding: 5px 14px;
    font-size: 12px;
}

.btn-clear-xs {
    padding: 3px 10px;
    font-size: 11px;
}

/* Vote detail section */
.votes-detail-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #ddd;
}

.votes-detail-section h4 {
    font-size: 14px;
    color: #555;
    margin: 0 0 10px;
}

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

.detail-table td {
    padding: 8px 12px;
}

/* Responsive */
@media (max-width: 600px) {
    .voting-auth-box {
        padding: 24px 16px;
    }

    .voting-card-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .phase-toggle {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .results-table {
        font-size: 12px;
    }

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

    .division-header-row {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .division-filter {
        gap: 4px;
    }

    .div-filter-btn {
        font-size: 11px;
        padding: 4px 10px;
    }
}
