Files
play-life/play-life-web/src/components/CurrentWeek.css
poignatov 7fdcbb75da
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m10s
5.13.0: Карточки проектов и желаний на экране недели
2026-03-05 12:42:52 +03:00

309 lines
6.1 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.
/* Стили для модального окна добавления записи */
.add-entry-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: 9999;
padding: 1rem;
}
.add-entry-modal {
background: white;
border-radius: 0.5rem;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
max-width: 400px;
width: calc(100% - 2rem);
max-height: 90vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
.add-entry-modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.5rem 0.5rem 1.5rem;
}
.add-entry-modal-title {
font-size: 1.25rem;
font-weight: 600;
color: #1f2937;
margin: 0;
}
.add-entry-close-button {
background: none;
border: none;
font-size: 1.5rem;
color: #6b7280;
cursor: pointer;
padding: 0;
width: 2rem;
height: 2rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.25rem;
transition: all 0.2s;
}
.add-entry-close-button:hover {
background: #f3f4f6;
color: #1f2937;
}
.add-entry-modal-content {
padding: 0.5rem 1.5rem 1.5rem 1.5rem;
overflow-y: auto;
overflow-x: hidden;
flex: 1;
}
.add-entry-field {
margin-bottom: 0.5rem;
}
.add-entry-label {
display: block;
font-size: 0.875rem;
font-weight: 600;
color: #374151;
margin-bottom: 0.5rem;
}
.add-entry-textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
font-size: 1rem;
box-sizing: border-box;
resize: vertical;
font-family: inherit;
}
.add-entry-textarea:focus {
outline: none;
border-color: #6366f1;
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.add-entry-rewards {
margin-bottom: 1.5rem;
}
.add-entry-reward-item {
display: flex;
gap: 0.5rem;
align-items: center;
margin-bottom: 0.75rem;
min-width: 0;
}
.add-entry-reward-item:last-child {
margin-bottom: 0;
}
.add-entry-reward-number {
display: flex;
align-items: center;
justify-content: center;
min-width: 2rem;
height: 2rem;
background: #f3f4f6;
border-radius: 0.375rem;
font-size: 1rem;
font-weight: 600;
color: #6b7280;
}
.add-entry-input {
padding: 0.75rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
font-size: 1rem;
box-sizing: border-box;
min-width: 0;
width: 100%;
}
.add-entry-input:focus {
outline: none;
border-color: #6366f1;
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.add-entry-project-input {
flex: 3;
min-width: 0;
}
.add-entry-score-input {
flex: 1;
min-width: 0;
max-width: 100px;
}
.add-entry-submit-button {
width: 100%;
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;
}
.add-entry-submit-button:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.add-entry-submit-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Внешний контейнер для карточки проекта — без общей тени и рамки */
.project-card-wrapper {
background-color: transparent;
}
/* Карточка с инфой по проекту — своя тень */
.project-card-inner {
box-shadow: 0 1px 3px 0 rgb(99 102 241 / 0.08);
transition: box-shadow 0.3s;
}
.project-card-inner:hover {
box-shadow: 0 2px 6px 0 rgb(99 102 241 / 0.12);
}
/* Блок с инфой по проекту: при наличии желаний убираем нижние закругления и добавляем отступ снизу */
.project-card-inner-with-wishes {
border-radius: 1.5rem 1.5rem 0 0 !important;
margin-bottom: 0.5rem;
}
/* Блок списка желаний: отдельная карточка со своей тенью */
.project-wishes-block {
background-color: #fff;
border-radius: 0 0 1.5rem 1.5rem;
box-shadow: 0 1px 3px 0 rgb(99 102 241 / 0.08);
}
/* Стили для горизонтального скролла желаний в карточке проекта */
.project-wishes-scroll {
display: flex;
gap: 0.5rem;
overflow-x: auto;
overflow-y: hidden;
padding: 0.5rem 1rem 0.75rem 1rem;
scrollbar-width: none;
-ms-overflow-style: none;
}
.project-wishes-scroll::-webkit-scrollbar {
display: none;
}
/* Мини-карточка желания */
.mini-wish-card {
flex-shrink: 0;
width: 50px;
cursor: pointer;
transition: transform 0.2s, opacity 0.2s;
}
.mini-wish-card:hover {
transform: scale(1.05);
}
.mini-wish-card:active {
transform: scale(0.95);
}
.mini-wish-image {
width: 50px;
height: 60px;
background: #f0f0f0;
border-radius: 8px;
overflow: hidden;
position: relative;
container-type: inline-size;
}
.mini-wish-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.mini-wish-overlay {
position: absolute;
inset: 0;
z-index: 1;
background: rgba(255, 255, 255, 0.65);
pointer-events: none;
}
/* Текст баллов поверх пелены (отдельный слой, выше по z-index) */
.mini-wish-unlock-points {
position: absolute;
top: 0;
left: 4px;
right: 4px;
bottom: 0;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
width: calc(100% - 8px);
max-width: calc(100% - 8px);
color: #5b6b8a;
/* font-size задаётся в JS по количеству цифр (auto-size) */
font-weight: 700;
line-height: 1.2;
pointer-events: none;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
box-sizing: border-box;
text-align: center;
}
.mini-wish-placeholder {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
background: white;
border: 1px solid #e5e7eb;
border-radius: 8px;
}
.mini-wish-name {
font-size: 0.625rem;
font-weight: 500;
color: #6b7280;
margin-top: 0.125rem;
line-height: 1.1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
}