Files
play-life/play-life-web/src/components/TaskList.css

930 lines
17 KiB
CSS
Raw Normal View History

.task-list {
max-width: 42rem; /* max-w-2xl = 672px */
margin: 0 auto;
padding-bottom: 2.5rem; /* Отступ для фиксированной кнопки добавления */
}
.task-search-container {
position: relative;
margin-bottom: 1.5rem;
}
.task-search-icon {
position: absolute;
left: 1rem;
top: 50%;
transform: translateY(-50%);
color: #9ca3af;
pointer-events: none;
z-index: 1;
}
.task-search-input {
width: 100%;
padding: 0.75rem 5.5rem 0.75rem 3rem;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
font-size: 1rem;
background: white;
color: #1f2937;
transition: all 0.2s;
}
.task-search-input:focus {
outline: none;
border-color: #6366f1;
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.task-search-input::placeholder {
color: #9ca3af;
}
/* Кнопка переключения группировки — всегда у правого края */
.task-grouping-toggle {
position: absolute;
right: 1rem;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: #9ca3af;
cursor: pointer;
padding: 0.25rem;
border-radius: 0.25rem;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
}
.task-grouping-toggle:hover {
background: #f3f4f6;
color: #6b7280;
}
/* Крестик очистки — слева от кнопки группировки, когда есть текст */
.task-search-clear {
position: absolute;
right: 3.5rem;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: #9ca3af;
cursor: pointer;
padding: 0.25rem;
font-size: 1.125rem;
line-height: 1;
border-radius: 0.25rem;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
}
.task-search-clear:hover {
background: #f3f4f6;
color: #1f2937;
}
.add-task-button {
width: 100%;
padding: 0.75rem 1rem;
background: linear-gradient(to right, #6366f1, #8b5cf6);
color: white;
border: none;
border-radius: 0.5rem;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
margin-bottom: 1.5rem;
transition: all 0.2s;
}
.add-task-button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.task-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-bottom: 1rem;
}
.task-divider {
height: 1px;
background: linear-gradient(to right, transparent, #e5e7eb, transparent);
margin: 1rem 0;
}
.task-item {
background: white;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
padding: 1rem;
cursor: pointer;
transition: all 0.2s;
}
.task-item:hover {
border-color: #6366f1;
box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}
.task-item-content {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.75rem;
}
.task-checkmark {
flex-shrink: 0;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: #9ca3af;
transition: all 0.2s;
border-radius: 50%;
padding: 2px;
}
.task-checkmark:hover {
color: #6366f1;
background-color: #f3f4f6;
}
.task-checkmark .checkmark-check {
opacity: 0;
transition: opacity 0.2s;
}
.task-checkmark:hover .checkmark-check {
opacity: 1;
}
.task-checkmark-detail:hover {
color: #8b5cf6;
}
.task-checkmark {
position: relative;
}
.task-checkmark-auto-complete .checkmark-check {
opacity: 0 !important;
}
.task-checkmark-auto-complete-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #9ca3af;
pointer-events: none;
z-index: 1;
}
.task-checkmark-wishlist-lightning-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #9ca3af;
pointer-events: none;
z-index: 1;
}
.task-name-container {
flex: 1;
display: flex;
align-items: center;
gap: 0.5rem;
min-width: 0;
overflow: hidden;
}
.task-name-wrapper {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.125rem;
min-width: 0;
overflow: hidden;
}
.task-name {
font-size: 1rem;
font-weight: 500;
color: #1f2937;
display: flex;
align-items: center;
gap: 0.25rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
flex: 1;
}
.task-next-show-date {
font-size: 0.75rem;
color: #6b7280;
font-weight: 400;
}
.task-subtasks-count {
color: #9ca3af;
font-size: 0.875rem;
font-weight: 400;
}
.task-badge-bar {
display: inline-flex;
align-items: center;
gap: 0.25rem;
margin-left: 0.25rem;
}
.task-progression-capsule {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.35rem;
background: #f3f4f6;
border-radius: 9999px;
padding: 0.15rem 0.5rem;
cursor: pointer;
transition: background 0.2s;
min-height: 1.5rem;
}
.task-progression-capsule:hover {
background: #e5e7eb;
}
.task-progression-capsule--saving {
opacity: 0.6;
cursor: not-allowed;
}
.task-progression-icon {
color: #9ca3af;
flex-shrink: 0;
}
.task-progression-value {
font-size: 0.8rem;
font-weight: 700;
color: #9ca3af;
min-width: 1rem;
text-align: center;
}
.task-infinite-icon {
color: #9ca3af;
flex-shrink: 0;
}
.task-recurring-icon {
color: #9ca3af;
flex-shrink: 0;
}
.task-actions {
display: flex;
align-items: center;
gap: 1rem;
}
.task-completed-count {
color: #6b7280;
font-size: 0.875rem;
font-weight: 500;
}
.task-postpone-button {
background: none;
border: none;
color: #6b7280;
cursor: pointer;
padding: 0.25rem;
border-radius: 0.25rem;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.task-postpone-button:hover {
background: #f3f4f6;
color: #6366f1;
}
.task-postpone-modal-overlay {
position: fixed !important;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999 !important;
padding: 1rem;
}
.task-postpone-modal {
background: white;
border-radius: 0.5rem;
width: fit-content;
max-width: 90%;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.task-postpone-modal-header {
padding: 1rem 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.task-postpone-modal-header h3 {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
color: #1f2937;
}
.task-postpone-close-button {
background: none;
border: none;
font-size: 1.5rem;
color: #6b7280;
cursor: pointer;
padding: 0;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.25rem;
transition: all 0.2s;
}
.task-postpone-close-button:hover {
background: #f3f4f6;
color: #1f2937;
}
.task-postpone-modal-content {
padding: 0 1.5rem 1.5rem 1.5rem;
}
.task-postpone-calendar {
margin-bottom: 1rem;
}
/* Стили для react-day-picker v9 */
.task-postpone-calendar .rdp {
--rdp-cell-size: 40px;
--rdp-accent-color: #9ca3af;
--rdp-accent-background-color: #9ca3af;
--rdp-background-color: transparent;
--rdp-outline: none;
--rdp-outline-selected: none;
--rdp-selected-border: none;
--rdp-selected-font: inherit;
margin: 0;
}
/* Ячейка дня */
.task-postpone-calendar .rdp-day {
border-radius: 0.375rem;
transition: all 0.2s;
}
/* Кнопка внутри дня */
.task-postpone-calendar .rdp-day_button {
border-radius: 0.375rem;
transition: all 0.2s;
}
.task-postpone-calendar .rdp-day_button:hover:not([disabled]) {
background-color: #f3f4f6;
}
/* Сегодняшняя дата - жирный текст */
.task-postpone-calendar .rdp-today .rdp-day_button,
.task-postpone-calendar .rdp-day.rdp-today button,
.task-postpone-calendar [data-today="true"] button,
.task-postpone-calendar .rdp [data-today] button {
font-weight: 700 !important;
color: #1f2937;
}
/* Выбранная дата - серый маленький залитый круг */
.task-postpone-calendar .rdp-selected {
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
.task-postpone-calendar .rdp-selected .rdp-day_button {
border: none !important;
border-radius: 50% !important;
background-color: #e5e7eb !important;
color: #6b7280 !important;
font-weight: 400 !important;
outline: none !important;
box-shadow: none !important;
cursor: pointer;
width: 28px !important;
height: 28px !important;
min-width: 28px !important;
min-height: 28px !important;
padding: 0 !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
.task-postpone-calendar .rdp-selected .rdp-day_button:hover {
background-color: #d1d5db !important;
}
/* Если дата одновременно сегодняшняя и выбранная */
.task-postpone-calendar .rdp-today.rdp-selected .rdp-day_button {
color: #6b7280 !important;
background-color: #e5e7eb !important;
font-weight: 700 !important;
}
/* Недоступные даты (прошлые) */
.task-postpone-calendar .rdp-disabled .rdp-day_button {
opacity: 1 !important;
cursor: not-allowed;
color: #9ca3af !important;
background-color: transparent !important;
}
.task-postpone-calendar .rdp-disabled .rdp-day_button:hover {
background-color: transparent !important;
}
/* Дни из других месяцев */
.task-postpone-calendar .rdp-outside .rdp-day_button {
opacity: 0.3;
color: #9ca3af;
}
/* Заголовок календаря */
.task-postpone-calendar .rdp-caption_label {
font-size: 1rem;
font-weight: 600;
color: #1f2937;
}
.task-postpone-calendar .rdp-nav_button {
border-radius: 0.375rem;
transition: all 0.2s;
}
.task-postpone-calendar .rdp-nav_button:hover {
background-color: #f3f4f6;
}
/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
.task-postpone-calendar .rdp {
--rdp-cell-size: 36px;
}
.task-postpone-calendar .rdp-caption_label {
font-size: 0.875rem;
}
}
.task-postpone-quick-buttons {
display: flex;
gap: 0.5rem;
margin-top: 0.5rem;
overflow-x: auto;
flex-wrap: nowrap;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
-ms-overflow-style: none;
width: 100%;
}
.task-postpone-quick-buttons::-webkit-scrollbar {
display: none;
}
.task-postpone-quick-button {
padding: 0.5rem 1rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
font-size: 0.875rem;
font-weight: 500;
color: #374151;
background: white;
cursor: pointer;
transition: all 0.2s;
flex-shrink: 0;
white-space: nowrap;
}
.task-postpone-quick-button:hover:not(:disabled) {
background: #f3f4f6;
border-color: #6366f1;
color: #6366f1;
}
.task-postpone-quick-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.task-postpone-input-group {
display: flex;
gap: 0.5rem;
align-items: center;
position: relative;
}
.task-postpone-input {
position: absolute;
opacity: 0;
width: 0;
height: 0;
pointer-events: none;
}
.task-postpone-display-date {
flex: 1;
padding: 0.75rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
font-size: 1rem;
background: white;
cursor: pointer;
transition: all 0.2s;
color: #1f2937;
user-select: none;
}
.task-postpone-display-date:hover {
border-color: #6366f1;
background: #f9fafb;
}
.task-postpone-display-date:active {
background: #f3f4f6;
}
.task-postpone-submit-checkmark {
padding: 0.75rem 1.5rem;
background: linear-gradient(to right, #6366f1, #8b5cf6);
color: white;
border: none;
border-radius: 0.375rem;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
min-width: 3rem;
}
.task-postpone-submit-checkmark:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.task-postpone-submit-checkmark:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.task-menu-button {
background: none;
border: none;
font-size: 1.25rem;
color: #6b7280;
cursor: pointer;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
transition: all 0.2s;
}
.task-menu-button:hover {
background: #f3f4f6;
color: #1f2937;
}
.task-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.task-modal {
background: white;
border-radius: 0.5rem;
padding: 0;
max-width: 400px;
width: 90%;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.task-modal-header {
padding: 1.5rem;
border-bottom: 1px solid #e5e7eb;
}
.task-modal-header h3 {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
color: #1f2937;
}
.task-modal-actions {
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.task-modal-edit,
.task-modal-delete {
width: 100%;
padding: 0.75rem;
border: none;
border-radius: 0.375rem;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.task-modal-edit {
background: #6366f1;
color: white;
}
.task-modal-edit:hover {
background: #4f46e5;
}
.task-modal-delete {
background: #ef4444;
color: white;
}
.task-modal-delete:hover:not(:disabled) {
background: #dc2626;
}
.task-modal-delete:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.loading,
.empty-state {
text-align: center;
padding: 3rem 1rem;
color: #6b7280;
}
.empty-state p {
margin: 0;
font-size: 1rem;
}
.loading-details {
text-align: center;
padding: 1rem;
color: #6b7280;
font-size: 0.875rem;
}
.project-group {
margin-bottom: 2rem;
}
.project-group-no-tasks {
margin-bottom: 0.5rem;
}
.project-group-header {
position: sticky;
top: 0;
z-index: 10;
background: #f3f4f6;
margin-bottom: 1rem;
display: flex;
align-items: center;
justify-content: space-between;
min-height: 2.5rem;
}
.project-group-header-clickable {
cursor: pointer;
padding: 0.5rem;
margin: -0.5rem -0.5rem -0.5rem -0.5rem;
margin-bottom: 0.5rem;
border-radius: 0.375rem;
transition: background-color 0.2s;
}
.project-group-header-clickable:hover {
background-color: #f9fafb;
}
.project-group-title {
font-size: 1.125rem;
font-weight: 600;
color: #1f2937;
margin: 0;
}
.project-group-title-empty {
color: #9ca3af;
}
.completed-toggle-header {
display: flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
background: #f9fafb;
border: 1px solid #e5e7eb;
border-radius: 0.375rem;
cursor: pointer;
font-size: 0.875rem;
font-weight: 500;
color: #6b7280;
transition: all 0.2s;
}
.completed-toggle-header:hover {
background: #f3f4f6;
color: #1f2937;
border-color: #d1d5db;
}
.completed-toggle-icon {
font-size: 0.75rem;
transition: transform 0.2s;
}
.completed-toggle-count {
font-size: 0.875rem;
font-weight: 500;
}
.completed-tasks {
margin-top: 0.5rem;
}
.completed-tasks .task-item {
opacity: 0.7;
}
.empty-group {
padding: 1rem;
text-align: center;
color: #9ca3af;
font-size: 0.875rem;
font-style: italic;
}
/* Badge icons for test and wishlist tasks */
.task-test-icon {
color: #3498db;
flex-shrink: 0;
}
.task-wishlist-icon {
color: #e74c3c;
flex-shrink: 0;
}
/* Add task/test modal */
.task-add-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.task-add-modal {
background: white;
border-radius: 0.75rem;
max-width: 320px;
width: 90%;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
animation: modalSlideIn 0.2s ease-out;
}
@keyframes modalSlideIn {
from {
transform: translateY(-20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.task-add-modal-header {
padding: 1.25rem 1.5rem 0.75rem;
text-align: center;
}
.task-add-modal-header h3 {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
color: #1f2937;
}
.task-add-modal-buttons {
padding: 0 1.5rem 1.5rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.task-add-modal-button {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
padding: 1rem;
border: none;
border-radius: 0.5rem;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.task-add-modal-button-task {
background: linear-gradient(to right, #6366f1, #8b5cf6);
color: white;
}
.task-add-modal-button-task:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.task-add-modal-button-test {
background: linear-gradient(to right, #3498db, #2980b9);
color: white;
}
.task-add-modal-button-test:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}
.task-add-modal-button-purchase {
background: linear-gradient(to right, #27ae60, #229954);
color: white;
}
.task-add-modal-button-purchase:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}