/* ============================= */
/* FUNDO DO PAINEL */
/* ============================= */
body {
    background: radial-gradient(
        circle at center,
        rgba(255,255,255,0.15) 0%,
        rgba(0,0,0,0.25) 40%,
        rgba(2,5,13,0.8) 100%
    );
    color: white;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* ============================= */
/* HEADER */
/* ============================= */
.bg-dark {
    background: linear-gradient(to bottom, #214f8f, #0c2347);
    border-bottom: 2px solid rgba(255,255,255,0.2);
    box-shadow: inset 0px -10px 20px rgba(0,0,0,.35), 0px 2px 6px rgba(0,0,0,.35);
}

/* ============================= */
/* TITULO DA VOTAÇÃO - AJUSTADO PARA TV */
/* ============================= */
.name_voting, #document_title {
    background: linear-gradient(to bottom, #0000, #0f2d5c);
    text-shadow: 0 3px 6px rgba(0,0,0,0.8);
    letter-spacing: 2px;
    font-size: 2.5rem; /* Aumentado para TV */
    font-weight: bold;
    padding: 20px !important;
    margin-bottom: 20px !important;
    color: white !important;
    line-height: 1.3;
    word-break: break-word;
}

.name_voting2, #document_subtitle {

    text-shadow: 0 2px 4px rgba(0,0,0,.8);
    font-size: 1.5rem;
    padding: 12px !important;
    margin-bottom: 20px !important;
    color: white !important;
    word-break: break-word;
}

/* ============================= */
/* CARD DO VEREADOR ATUAL - AJUSTADO PARA TV */
/* ============================= */
.current-councilor-card {
    height:100%;
    background: linear-gradient(to bottom, #0f2549, #07152c);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    box-shadow: inset 0px 0px 16px rgba(0,0,0,.4), 0px 4px 12px rgba(0,0,0,.35);
    overflow: hidden;
    margin-bottom: 0px  !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 26px 20px 0;
}

.current-councilor-image {
    width: min(100%, 300px);
    aspect-ratio: 4 / 5;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    object-position: center top;
    border-radius: 18px;
    border: 3px solid rgba(255,255,255,0.12);
    border-bottom: 4px solid rgba(255,215,0,0.3);
    transition: all .4s ease;
    display: block;
    margin: 0 auto 18px auto;
    box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

.current-councilor-name {
    background: linear-gradient(to right, #1e3a6b, #0f2347);
    padding: 16px 18px;
    margin: 0;
    font-size: 1.45rem;
    font-weight: bold;
    letter-spacing: 1px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-transform: uppercase;
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,.5);
    width: 100%;
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.35;
}


@media (max-width: 1200px) {
    .current-councilor-card {
        padding: 20px 16px 0;
    }

    .current-councilor-image {
        width: min(100%, 260px);
    }
}

@media (max-width: 768px) {
    .current-councilor-card {
        padding: 18px 14px 0;
    }

    .current-councilor-image {
        width: min(100%, 220px);
        max-height: 300px;
    }

    .current-councilor-name {
        min-height: auto;
        font-size: 1.15rem;
    }
}

/* ============================= */
/* CARDS DE VOTAÇÃO - AJUSTADOS PARA TV */
/* ============================= */
.custom-card-voting {
    height: 240px;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: .3s;
    box-shadow:none !important;
    margin-bottom: 20px;
}

.custom-card-voting:hover {
    transform: scale(1.02);
}

.custom-card-voting h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 5px 0;
    color: white !important;
    line-height: 1.2;
}

.custom-card-voting .vote-number {
    font-size: 4rem !important;
    font-weight: bold;
    line-height: 1;
    margin: 0;
    color: white !important;
}

/* ============================= */
/* CORES DOS CARDS */
/* ============================= */
.bg-success {
    background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
    box-shadow: inset 0px -18px 36px rgba(0,0,0,.28), 0px 2px 8px rgba(0,0,0,.25);
}

.bg-danger {
    background: linear-gradient(135deg, #ff3b3b, #b30000) !important;
    box-shadow: inset 0px -18px 36px rgba(0,0,0,.28), 0px 2px 8px rgba(0,0,0,.25);
}

.custom-bg {
    background: linear-gradient(135deg, #2f6ed6, #0e3c87) !important;
    box-shadow: inset 0px -18px 36px rgba(0,0,0,.28), 0px 2px 8px rgba(0,0,0,.25);
}

/* ============================= */
/* LISTA DE VEREADORES - AJUSTADA PARA TV */
/* ============================= */
.voting-list-container {
    padding: 20px;

    background: linear-gradient(
        145deg,
        rgba(255,255,255,0.08),
        rgba(255,255,255,0.02)
    );

    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.15);

    box-shadow:
        0 4px 14px rgba(0,0,0,0.28),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.list-group {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-group-item {
    background: linear-gradient(to right, #1c2e50, #0b1b38);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px !important;
    margin-bottom: 0;
    color: white !important;
    transition: all .3s ease;
    box-shadow: inset 0px -8px 16px rgba(0,0,0,.25), 0px 2px 6px rgba(0,0,0,.22);
    padding: 10px 20px 10px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.list-group-item:hover {
    transform: translateX(8px);
    background: linear-gradient(to right, #243b67, #0f2347);
}

.councilor-info {
    display: flex;
    align-items: center;
    gap: 18px; /* Aumentado gap */
    flex: 1;
    min-width: 0;
}

.councilor-image-container {
    width: 55px; /* Aumentado para TV */
    height: 55px; /* Aumentado para TV */
    min-width: 55px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 1px 4px rgba(0,0,0,.22);
    background: linear-gradient(135deg, #2a5ea8, #0f2d5c);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.councilor-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.councilor-image[src$="sem-foto.jpg"] {
    object-fit: contain;
    padding: 8px;
    opacity: 0.8;
}

.councilor-name {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    word-break: break-word;
    line-height: 1.4;
    flex: 1;
    color: white !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.3em;
}

.vote-badge {
    padding: 8px 22px;
    border-radius: 30px;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0px 1px 3px rgba(0,0,0,.2);
    font-size: 1.1rem;
    min-width: 100px;
    text-align: center;
    white-space: nowrap;
    margin-left: 18px;
    flex-shrink: 0;
    color: white !important;
}

.vote-sim .vote-badge {
    background: linear-gradient(135deg, #3fa65b, #2d7a41);
    color: white !important;
}

.vote-nao .vote-badge {
    background: linear-gradient(135deg, #c62828, #8e1a1a);
    color: white !important;
}

.vote-abstencao .vote-badge {
    background: linear-gradient(135deg, #1e4fa5, #123377);
    color: white !important;
}

/* ============================= */
/* ESTILO PARA AUSENTE */
/* ============================= */
.vote-ausente {
    opacity: 0.8;
}

.vote-ausente .vote-badge {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    color: white !important;
    box-shadow: inset 0px -8px 16px rgba(0,0,0,.2), 0px 1px 3px rgba(0,0,0,.2);
}

.vote-ausente .councilor-image-container {
    border-color: rgba(255,255,255,0.2);
    opacity: 0.8;
}

.vote-ausente:hover {
    opacity: 1;
}

/* ============================= */
/* TEXTOS GENÉRICOS */
/* ============================= */
h1, h2, h3, h4, h5, h6, p, span, div, td, th {
    color: white;
}

.text_reset {
    color: white !important;
}

#assemblyman, #yes, #no, #abstention {
    color: white !important;
}

/* ============================= */
/* ANIMAÇÕES */
/* ============================= */
.counter-update {
    animation: counterPop .4s ease;
}

@keyframes counterPop {
    0% { transform: scale(.8); opacity: .6; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.fade-update {
    animation: fadeUpdate .4s;
}

@keyframes fadeUpdate {
    0% { opacity: .6; }
    100% { opacity: 1; }
}

.vote-enter {
    animation: voteEnter .6s ease;
}

@keyframes voteEnter {
    0% { opacity: 0; transform: translateX(-40px) scale(.95); }
    60% { transform: translateX(10px) scale(1.05); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

.assemblyman-image.loading {
    filter: blur(3px);
    transform: scale(.95);
}

.assemblyman-image:not(.loading) {
    animation: imageReveal .5s ease;
}

@keyframes imageReveal {
    from { opacity: 0; transform: scale(.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================= */
/* RESPONSIVIDADE - MANTIDA PARA TELAS MENORES */
/* ============================= */
@media (max-width: 1366px), (max-height: 768px) {
    .container-fluid {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .name_voting, #document_title {
        font-size: 2rem;
        padding: 12px !important;
        margin-bottom: 10px !important;
        line-height: 1.2;
    }

    .name_voting2, #document_subtitle {
        font-size: 1.2rem;
        padding: 8px !important;
        margin-bottom: 12px !important;
        line-height: 1.2;
    }

    .current-councilor-card {
        padding: 18px 14px 0;
    }

    .current-councilor-image {
        width: min(100%, 230px);
        max-height: 290px;
        margin-bottom: 12px;
    }

    .current-councilor-name {
        min-height: 72px;
        padding: 10px 12px;
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .custom-card-voting {
        height: 165px;
        margin-bottom: 12px;
    }

    .custom-card-voting h1 {
        font-size: 1.8rem;
        line-height: 1.1;
    }

    .custom-card-voting .vote-number {
        font-size: 3rem !important;
    }

    .voting-list-container {
        padding: 14px;
    }

    .list-group {
        gap: 6px;
    }

    .list-group-item {
        min-height: 56px;
        padding: 8px 14px 8px 8px;
    }

    .councilor-info {
        gap: 12px;
    }

    .councilor-image-container {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .councilor-name {
        font-size: 1rem;
        line-height: 1.25;
        max-height: 2.6em;
    }

    .vote-badge {
        min-width: 88px;
        padding: 6px 14px;
        margin-left: 12px;
        font-size: 0.95rem;
    }
}

@media (max-width: 1366px) and (max-height: 768px) {
    .row.mt-4 {
        margin-top: 1rem !important;
    }

    .voting-list-container {
        max-height: calc(100vh - 360px);
        overflow: hidden;
    }
}

@media (max-width: 1200px) {
    .custom-card-voting { height: 200px; }
    .custom-card-voting h1 { font-size: 2.2rem; }
    .custom-card-voting .vote-number { font-size: 3.5rem !important; }
    .councilor-name { font-size: 1.1rem; }
}

@media (max-width: 768px) {
    .name_voting, #document_title { font-size: 1.5rem; padding: 10px !important; }
    .name_voting2, #document_subtitle { font-size: 1.1rem; padding: 8px !important; }
    .custom-card-voting { height: 140px; }
    .custom-card-voting h1 { font-size: 1.5rem; }
    .custom-card-voting .vote-number { font-size: 2.5rem !important; }
    .councilor-name { font-size: 0.9rem; }
    .vote-badge { padding: 4px 12px; min-width: 70px; font-size: 0.8rem; }
    .councilor-image-container { width: 40px; height: 40px; min-width: 40px; }
    .voting-list-container { padding: 10px; }
}

/* ============================= */
/* Painel Default  */
/* ============================= */
.logo-container{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100%;
    height: 100vh;
    text-align: center;
}

.logo-container img{
    max-width: 50%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.15));
}

/* ============================= */
/* Painel do Resumo  */
/* ============================= */
.vote-badge{
    padding:6px 14px;
    border-radius:20px;
    font-weight:bold;
    font-size:14px;
    letter-spacing:1px;
    color:#fff;
}

.vote-yes{
    background: linear-gradient(135deg,#49d46b,#2fa84e);
    border:1px solid rgba(0,0,0,0.25);
    box-shadow:0 0 4px rgba(73,212,107,0.25);
}

.vote-no{
    background: linear-gradient(135deg,#ff4b4b,#c82333);
    border:1px solid rgba(0,0,0,0.25);
    box-shadow:0 0 4px rgba(255,75,75,0.25);
}

.vote-abstention{
    background: linear-gradient(135deg,#9aa0a6,#6c757d);
    border:1px solid rgba(0,0,0,0.25);
    box-shadow:0 0 3px rgba(150,150,150,0.2);
}

.vote-out{
    background: linear-gradient(135deg,#ffd54f,#ffb300);
    color:#222;
    border:1px solid rgba(0,0,0,0.25);
    box-shadow:0 0 4px rgba(255,193,7,0.25);
}
