Corp/backend/static/css/components/chat-polls.css

170 lines
3.2 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* Стили для голосований в чате */
/* Модальное окно - центрирование */
#pollModal .modal-dialog {
display: flex;
align-items: center;
min-height: calc(100% - 1rem);
}
@media (min-width: 576px) {
#pollModal .modal-dialog {
min-height: calc(100% - 3.5rem);
max-width: 500px;
margin: 1.75rem auto;
}
}
.poll-widget {
padding: 1rem;
background: var(--bs-secondary-bg);
border-radius: 0.5rem;
margin: 0.5rem 0;
}
.poll-question {
font-size: 1.1rem;
color: var(--bs-body-color);
font-weight: 400;
}
.poll-option {
position: relative;
}
.poll-option.voted {
background: rgba(var(--bs-success-rgb), 0.1);
padding: 0.5rem;
border-radius: 0.375rem;
}
.btn-poll-option {
transition: all 0.2s;
}
.btn-poll-option:hover {
background: var(--bs-primary);
color: white;
border-color: var(--bs-primary);
transform: translateX(4px);
}
.poll-option-result .progress {
background-color: rgba(0, 0, 0, 0.1);
}
.poll-option-result .progress-bar {
background-color: var(--bs-primary);
transition: width 0.6s ease;
}
.poll-option.voted .progress-bar {
background-color: var(--bs-success);
}
.poll-footer {
border-top: 1px solid rgba(0, 0, 0, 0.1);
padding-top: 0.75rem;
}
/* Стили для сообщений с голосованиями */
.message-bubble .poll-widget {
max-width: 500px;
}
/* Голосования в сообщениях слева (других пользователей) - серый фон */
.bubble-other .poll-widget {
background: var(--bs-secondary-bg);
}
/* Голосования в сообщениях справа (автора) - голубой фон */
.bubble-me .poll-widget {
background: rgba(255, 255, 255, 0.15);
}
.bubble-me .poll-question {
color: #fff;
}
.bubble-me .poll-option-result .progress {
background-color: rgba(255, 255, 255, 0.2);
}
.bubble-me .poll-option-result .progress-bar {
background-color: rgba(255, 255, 255, 0.6);
}
.bubble-me .poll-footer {
border-top-color: rgba(255, 255, 255, 0.2);
}
/* Модальное окно создания голосования */
#pollModal .remove-option {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
#pollOptions .input-group-text {
min-width: 40px;
justify-content: center;
font-weight: 600;
}
/* Список проголосовавших */
.poll-voters {
margin-top: 0.5rem;
}
.poll-voters-toggle {
cursor: pointer;
transition: color 0.2s;
}
.poll-voters-toggle:hover {
color: var(--bs-primary) !important;
text-decoration: underline !important;
}
.poll-voters-toggle i {
transition: transform 0.2s;
font-size: 0.75rem;
}
.poll-voters-list {
animation: slideDown 0.2s ease-out;
background: rgba(0, 0, 0, 0.03);
padding: 0.5rem 1rem;
border-radius: 0.25rem;
margin-top: 0.5rem;
}
.bubble-me .poll-voters-list {
background: rgba(255, 255, 255, 0.1);
}
[data-bs-theme="dark"] .poll-voters-list {
background: rgba(255, 255, 255, 0.05);
}
.voter-item {
padding: 0.25rem 0;
display: flex;
align-items: center;
}
.voter-item i {
opacity: 0.6;
font-size: 0.875rem;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-5px);
}
to {
opacity: 1;
transform: translateY(0);
}
}