/* module_page_vote */

/* === card_header === */
.card_header {
    display: flex;
    justify-content: space-between;
    margin: 0 0 10px 0;
    align-items: center;
    background: var(--card);
    border-radius: var(--br-16);
    padding: 1rem;
    gap: 1rem;
}
.card_header .svg_header { display: flex; }
.card_header .svg_header svg { width: 2rem; height: 2rem; fill: var(--text-default); }
.card_header .svg_text_header { display: flex; gap: 10px; align-items: center; min-width: 0; }
.card_header .header_text { min-width: 0; }
.card_header .flex_header_top {
    color: var(--text-default);
    font-size: var(--font-size-default);
    font-weight: var(--font-weight-7);
}
.card_header .flex_header_bottom {
    font-size: var(--font-size-s);
    font-weight: var(--font-weight-5);
    color: var(--text-secondary);
}
.card_header .block_buttons { display: flex; gap: 5px; flex-wrap: wrap; flex-shrink: 0; }
.card_header .block_buttons .button { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 1079.9px) {
    .card_header .flex_header_bottom { display: none; }
}
@media (max-width: 578px) {
    .card_header { flex-direction: column; gap: 10px; align-items: stretch; }
    .card_header .svg_text_header { justify-content: center; }
    .card_header .flex_header_top { font-size: var(--font-size-m); text-align: center; }
}

/* === stats === */
.vote-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}
.vote-stat {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border-radius: var(--br-16);
}
.vote-stat__icon {
    flex-shrink: 0; width: 44px; height: 44px;
    border-radius: var(--br-12);
    background: var(--transparent-2-w, rgba(255,255,255,.05));
    display: flex; align-items: center; justify-content: center;
}
.vote-stat__icon svg { width: 18px; height: 18px; fill: var(--span); }
.vote-stat__body { display: flex; flex-direction: column; min-width: 0; }
.vote-stat__label { font-size: var(--font-size-s); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vote-stat__value { font-size: var(--font-size-l); color: var(--text-default); font-weight: var(--font-weight-7); }

/* === slots grid === */
.vote-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    align-items: stretch;
}
@media (max-width: 578px) { .vote-grid { grid-template-columns: 1fr; } }

.vote-card {
    background: var(--card);
    border-radius: var(--br-16);
    padding: 1rem;
}

.vote-slot { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.vote-slot__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.vote-slot__title {
    margin: 0; flex: 1 1 auto; min-width: 0;
    color: var(--text-default);
    font-size: var(--font-size-default); font-weight: var(--font-weight-7);
    word-break: break-word;
}
.vote-slot__reward {
    flex-shrink: 0; align-self: flex-start;
    padding: 4px 10px; border-radius: 999px;
    background: var(--transparent-2-w, rgba(255,255,255,.05));
    color: var(--span); font-size: var(--font-size-s); font-weight: var(--font-weight-6);
    white-space: nowrap;
}
.vote-slot__meta {
    display: flex; flex-direction: column; gap: 4px;
    color: var(--text-secondary); font-size: var(--font-size-s);
}
.vote-slot__meta b { color: var(--text-custom); font-weight: var(--font-weight-6); }

.vote-slot__actions {
    display: flex; gap: 5px; flex-wrap: nowrap;
    margin-top: auto;
}
.vote-slot__actions .button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    flex: 1 1 0; min-width: 0; min-height: 40px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vote-slot__actions .vote-delete-slot {
    flex: 0 0 40px; width: 40px; padding-left: 0; padding-right: 0;
}
.vote-slot__actions .button svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }

.vote-claim:disabled { opacity: .55; cursor: not-allowed; }
.vote-claim__timer { font-variant-numeric: tabular-nums; font-size: var(--font-size-s); color: var(--text-secondary); }

/* user страница: кнопки в столбик */
.vote-slot:not(.vote-slot--admin) .vote-slot__actions { flex-direction: column; }
.vote-slot:not(.vote-slot--admin) .vote-slot__actions .button { width: 100%; flex: 0 0 auto; }

.vote-empty {
    background: var(--card);
    border-radius: var(--br-16);
    padding: 1.5rem; text-align: center; color: var(--text-secondary);
}

/* === модалка === */
.vote-modal { width: 100%; min-width: 520px; max-width: 560px; }
@media (max-width: 568.9px) { .vote-modal { min-width: 0; max-width: 96%; } }

.vote-modal .flex-inline > .inputs-inline { flex: 1 1 0; min-width: 0; }
.vote-modal .inputs-inline > select,
.vote-modal .inputs-inline > input {
    width: 100%; box-sizing: border-box; min-height: 40px;
}
.vote-modal .inputs-inline > input[type="url"] { text-overflow: ellipsis; }
.vote-modal .inputs-inline label {
    display: block; margin-bottom: 4px;
    color: var(--text-secondary); font-size: var(--font-size-s);
}
.vote-modal button[type="submit"], #vote_general_form button[type="submit"] { min-height: 44px; }

/* === logs === */
.vote-logs-card { display: flex; flex-direction: column; gap: 10px; }

.vote-logs-table-wrapper {
    overflow-x: auto;
    border-radius: var(--br-12);
    background: var(--transparent-2-w, rgba(255,255,255,.03));
}
.vote-logs-table {
    width: 100%; border-collapse: collapse;
    color: var(--text-custom); font-size: var(--font-size-s);
}
.vote-logs-table th, .vote-logs-table td {
    padding: 10px 12px; text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.05);
    vertical-align: middle;
}
.vote-logs-table th { color: var(--text-secondary); font-weight: var(--font-weight-6); background: rgba(255,255,255,.04); }
.vote-logs-table tr:last-child td { border-bottom: none; }

.vote-logs-empty { text-align: center; color: var(--text-secondary); padding: 24px !important; }

.vote-logs-player { display: inline-flex; align-items: center; gap: 8px; color: var(--text-custom); text-decoration: none; }
.vote-logs-player img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.vote-logs-player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

.vote-logs-reward { color: var(--span); font-weight: var(--font-weight-6); white-space: nowrap; }

.vote-logs-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; }
.vote-logs-pagination .button {
    min-width: 40px; min-height: 36px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
}
.vote-logs-pagination .button svg { width: 12px; height: 12px; fill: currentColor; }
.vote-logs-pagination .button:disabled { opacity: .4; cursor: not-allowed; }
.vote-logs-page { color: var(--text-secondary); font-size: var(--font-size-s); min-width: 30px; text-align: center; }


/* === user toolbar === */

.vote-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.vote-toolbar .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
}

.vote-toolbar .button svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.vote-check-all:disabled {
    opacity: .8;
    cursor: progress;
}

@media (max-width: 578px) {
    .vote-toolbar { justify-content: stretch; }
    .vote-toolbar .button { flex: 1 1 0; justify-content: center; }
}
