Files
nahodka-front/src/styles/card.css
2026-09-23 23:38:54 +03:00

574 lines
15 KiB
CSS

/* ── Post Card (Instagram-style vertical post) ── */
.f-card {
flex-shrink: 0;
background: var(--bg-card);
border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
transition: border-color .2s;
cursor: pointer;
}
.f-card:hover { border-color: var(--muted2); }
.f-card-loss {
border-color: transparent;
box-shadow: 0 0 0 2px rgba(237,73,86,.7);
}
.f-card-found {
border-color: transparent;
box-shadow: 0 0 0 2px rgba(48,168,94,.7);
}
/* ── Post header ── */
.f-card-head {
display: flex; align-items: center; gap: 12px;
padding: 12px 14px 12px 17px;
}
.f-head-loss,
.f-head-found {
color: var(--text-primary);
}
.f-head-loss .f-card-author-name { color: var(--text-primary); }
.f-head-loss .f-type-badge { background: rgba(237,73,86,.1); color: #ed4956; border-color: rgba(237,73,86,.4); }
.f-head-found .f-card-author-name { color: var(--text-primary); }
.f-head-found .f-type-badge { background: rgba(48,168,94,.1); color: #30a85e; border-color: rgba(48,168,94,.4); }
.f-card-avatar-ring {
width: 42px; height: 42px; border-radius: 50%;
background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
display: flex; align-items: center; justify-content: center;
flex-shrink: 0;
}
.f-card-avatar {
width: 36px; height: 36px; border-radius: 50%;
background: var(--bg-card);
display: flex; align-items: center; justify-content: center;
font-size: 1.05rem; overflow: hidden;
}
.f-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.f-card-author { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.f-card-author-name {
color: var(--text-primary); font-weight: 800; font-size: 1.1rem;
word-break: break-word;
}
.f-card-author-loc {
color: var(--muted); font-size: .78rem;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.f-card-head-side { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* ── Image panel ── */
.f-card-img {
position: relative;
width: 100%;
aspect-ratio: 1 / 1;
background: var(--bg-card-img);
display: flex; align-items: center; justify-content: center;
overflow: hidden;
border: none; outline: none;
}
.f-card-img img {
width: 100%; height: 100%;
object-fit: cover; object-position: center;
display: block;
border: none; outline: none;
}
.f-card-emoji { font-size: 4rem; opacity: .85; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }
.f-card-reward {
position: absolute; top: 12px; right: 12px; z-index: 2;
background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
border-radius: 999px; padding: 5px 12px;
font-size: .75rem; font-weight: 800;
color: #f5d76e;
}
/* ── Action row ── */
.f-card-actions {
display: flex; align-items: center; justify-content: space-between;
padding: 10px 12px 4px;
}
.f-card-actions-left, .f-card-actions-right {
display: flex; align-items: center; gap: 6px;
}
.f-card-reward-text {
display: inline-block;
white-space: nowrap;
}
/* Золотой переливающийся текст внутри кнопки-пилюли */
.f-reward-btn-label {
font-size: .74rem; font-weight: 600; letter-spacing: .02em;
background: linear-gradient(110deg, #e6b800 30%, #ffec99 50%, #e6b800 70%);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: f-reward-shimmer 5s ease-in-out infinite;
}
@keyframes f-reward-shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
/* Кнопка «Вознаграждение» в виде пилюли в золотой обводке — видно, что
на неё можно нажать. Заливка лёгкая, сам перелив живёт в .f-reward-btn-label */
button.f-card-reward-btn {
border: 1px solid rgba(230, 184, 0, 0.5);
border-radius: 999px;
background: rgba(230, 184, 0, 0.08);
padding: 4px 12px;
cursor: pointer;
font-family: var(--font);
line-height: inherit;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
transition: transform .15s ease, filter .15s ease, border-color .15s ease, background .15s ease;
}
button.f-card-reward-btn:hover {
transform: scale(1.08);
border-color: rgba(230, 184, 0, 0.85);
background: rgba(230, 184, 0, 0.16);
filter: brightness(1.1) drop-shadow(0 0 6px rgba(230, 184, 0, 0.45));
}
button.f-card-reward-btn:active { transform: scale(.94); }
button.f-card-reward-btn:focus-visible {
outline: 2px solid rgba(230,184,0,.7);
outline-offset: 2px;
border-radius: 999px;
}
/* ── Всплывающее окно вознаграждения ── */
.f-reward-popup {
max-width: 260px;
padding: 12px 14px;
border-radius: 14px;
background: linear-gradient(150deg, rgba(48,39,16,.97), rgba(22,18,10,.98));
backdrop-filter: blur(10px) saturate(140%);
-webkit-backdrop-filter: blur(10px) saturate(140%);
border: 1px solid rgba(230,184,0,.55);
box-shadow:
0 8px 30px rgba(0,0,0,.4),
0 0 0 1px rgba(230,184,0,.12),
0 0 26px rgba(230,184,0,.2);
animation: f-reward-pop-in .3s cubic-bezier(.34,1.56,.64,1);
}
.f-reward-popup-title {
font-size: .74rem;
font-weight: 900;
letter-spacing: .05em;
text-transform: uppercase;
margin-bottom: 7px;
white-space: nowrap;
background: linear-gradient(110deg, #e6b800 25%, #ffec99 50%, #e6b800 75%);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: f-reward-shimmer 3.2s ease-in-out infinite;
}
.f-reward-popup-text {
font-size: .92rem;
line-height: 1.5;
color: #ffe9a8;
word-break: break-word;
overflow-wrap: break-word;
}
@keyframes f-reward-pop-in {
from { opacity: 0; transform: translateY(-8px) scale(.85); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
/* ── Likes ── */
.f-card-likes {
padding: 2px 16px;
color: var(--text-primary); font-weight: 800; font-size: .9rem;
}
/* ── Caption ── */
.f-card-caption {
padding: 6px 16px;
color: var(--text-primary); font-size: .87rem; line-height: 1.5;
}
.f-card-caption-name { font-weight: 800; margin-right: 6px; }
.f-card-caption-text {
color: var(--text-primary);
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.f-card-caption-text.f-truncatable { cursor: pointer; }
.f-card-caption-text.f-expanded {
-webkit-line-clamp: unset;
line-clamp: unset;
overflow: visible;
}
/* ── Meta pills ── */
.f-card-meta {
display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start;
gap: 6px; padding: 8px 16px 4px;
}
.f-meta-pill {
display: inline-flex; align-items: center; gap: 4px;
background: rgba(var(--teal-rgb), .1);
border: 1px solid rgba(var(--teal-rgb), .3);
border-radius: 999px; padding: 3px 10px;
font-family: var(--font);
font-size: .74rem; color: var(--teal);
transition: all .2s;
}
.f-meta-pill svg { width: 1em; height: 1em; flex-shrink: 0; }
.f-meta-pill:hover {
background: rgba(var(--teal-rgb), .18);
border-color: rgba(var(--teal-rgb), .5);
}
.f-loc-pill { cursor: pointer; }
.f-cat-badge {
display: inline-flex; align-items: center;
background: rgba(var(--teal-rgb), .08);
border: 1px solid rgba(var(--teal-rgb), .25);
border-radius: 999px; padding: 3px 10px;
font-size: .74rem; font-weight: 700; color: var(--teal);
}
.f-type-badge {
border-radius: 999px; padding: 3px 10px;
font-size: .74rem; font-weight: 800;
}
.f-type-loss { background: rgba(237,73,86,.1); color: #ed4956; border: 1px solid rgba(237,73,86,.25); }
.f-type-found { background: rgba(48,168,94,.1); color: #30a85e; border: 1px solid rgba(48,168,94,.25); }
/* Status badge for closed/found posts */
.f-status-badge {
border-radius: 999px; padding: 2px 8px;
font-size: .7rem; font-weight: 800;
display: inline-block; vertical-align: middle;
}
.f-status-closed {
background: rgba(48,168,94,.12); color: #30a85e; border: 1px solid rgba(48,168,94,.3);
}
/* ── Role badges (LOST_AND_FOUND / METRO) ── */
.f-role-badge {
display: inline-flex; align-items: center; gap: 4px;
border-radius: 999px; padding: 3px 8px;
font-size: .68rem; font-weight: 800;
white-space: nowrap;
}
.f-role-lost-found {
background: rgba(255,200,50,.15); color: #b8890f;
border: 1px solid rgba(255,200,50,.35);
}
.f-role-metro {
background: rgba(227,6,19,.1); color: #e30613;
border: 1px solid rgba(227,6,19,.25);
}
.f-role-metro-letter {
display: inline-flex; align-items: center; justify-content: center;
width: 14px; height: 14px; border-radius: 50%;
background: #e30613; color: #fff;
font-size: 9px; font-weight: 900; line-height: 1;
}
/* ── Footer (phone + owner actions) ── */
.f-card-foot {
display: flex; flex-direction: row; align-items: center; justify-content: space-between;
gap: 10px; padding: 10px 16px 12px;
}
.f-card-phone {
color: var(--teal); font-size: .85rem; font-weight: 700;
text-decoration: none; display: flex; align-items: center; gap: 4px;
white-space: nowrap;
}
.f-card-date { color: var(--muted2); font-size: .75rem; }
.f-card-contact {
display: flex; align-items: center; gap: 5px;
background: rgba(var(--teal-rgb), .1);
border: 1px solid rgba(var(--teal-rgb), .3);
border-radius: 999px; padding: 12px 34px;
cursor: pointer; font-family: var(--font);
font-size: .95rem; font-weight: 700;
color: var(--teal); transition: all .2s;
white-space: nowrap;
}
.f-card-contact:hover {
background: rgba(var(--teal-rgb), .18);
border-color: rgba(var(--teal-rgb), .5);
}
/* Closed/Found card styling */
.f-card-closed {
opacity: .8;
border-color: rgba(48,168,94,.3);
}
.f-card-closed:hover { border-color: rgba(48,168,94,.5); }
.f-card-closed .f-card-img { filter: grayscale(.5); }
.f-card-closed .f-card-caption-name { text-decoration: line-through; opacity: .7; }
/* Edit & Delete buttons */
.f-card-edit-btn,
.f-card-delete-btn {
display: flex; align-items: center; justify-content: center;
background: none; border: 1px solid var(--border);
border-radius: 50%; width: 34px; height: 34px;
cursor: pointer; transition: all .2s;
color: var(--muted); padding: 0;
}
.f-card-edit-btn:hover {
border-color: rgba(var(--teal-rgb), .5); color: var(--teal); background: rgba(var(--teal-rgb), .08);
}
.f-card-delete-btn:hover {
border-color: rgba(237,73,86,.5); color: #ed4956; background: rgba(237,73,86,.08);
}
/* Mark as Found button */
.f-card-found-wrap {
display: flex; justify-content: center;
padding: 0 16px 12px; margin-top: 2px;
}
.f-card-found-btn {
display: flex; align-items: center; gap: 5px;
background: rgba(48,168,94,.1); border: 1px solid rgba(48,168,94,.3);
border-radius: 999px; padding: 8px 18px;
cursor: pointer; transition: all .2s;
font-family: var(--font); font-size: .875rem; font-weight: 700;
color: #30a85e;
}
.f-card-found-btn:hover {
background: rgba(48,168,94,.18); border-color: rgba(48,168,94,.5);
}
/* ── Calendar Popup ── */
.f-date-calendar {
background: var(--bg-card-popup);
border: 1px solid var(--border);
border-radius: 12px;
padding: 10px;
width: 220px;
box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.f-date-calendar-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.25);
z-index: 1000;
}
.f-cal-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 8px;
font-size: .82rem;
font-weight: 700;
color: var(--text-primary);
}
.f-cal-header button {
background: none;
border: none;
color: var(--text-primary);
font-size: 1.1rem;
cursor: pointer;
padding: 2px 6px;
border-radius: 6px;
line-height: 1;
}
.f-cal-header button:hover {
background: var(--hover-bg);
}
.f-cal-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 2px;
text-align: center;
font-size: .75rem;
}
.f-cal-day-name {
font-weight: 700;
color: var(--muted);
padding: 4px 0;
font-size: .68rem;
}
.f-cal-day {
padding: 4px 0;
border-radius: 6px;
cursor: default;
}
.f-cal-selected {
background: rgba(var(--teal-rgb), .25);
color: var(--teal);
font-weight: 800;
}
.f-reward-checkbox {
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
color: #d4af37;
user-select: none;
}
.f-reward-checkbox input { display: none; }
.f-reward-checkmark {
width: 20px;
height: 20px;
flex-shrink: 0;
border: 2px solid #d4af37;
border-radius: 5px;
transition: .2s;
position: relative;
}
.f-reward-checkbox input:checked + .f-reward-checkmark {
background: #d4af37;
box-shadow: 0 0 10px rgba(212, 175, 55, .35);
}
.f-reward-checkbox input:checked + .f-reward-checkmark::after {
content: "";
position: absolute;
left: 5px;
top: 1px;
width: 5px;
height: 10px;
border: solid #17130a;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
.f-reward-text {
font-size: .9rem;
font-weight: 700;
}
.f-date-pill {
cursor: pointer;
position: relative;
}
@media (max-width: 600px) {
.f-card-contact {
padding: 12px 34px;
font-size: .95rem;
}
}
/* ── Advertisement card ── */
.ad-slot-placeholder {
min-height: 250px; /* высота типичного ad-card — резервируем место, чтобы не дёргалась лента */
}
.ad-card {
position: relative;
border-radius: 12px;
overflow: hidden;
margin: 12px 0;
}
.ad-card__label {
position: absolute;
top: 8px;
left: 8px;
background: rgba(0, 0, 0, 0.6);
color: #fff;
font-size: 11px;
padding: 2px 8px;
border-radius: 4px;
z-index: 2;
}
.ad-card__media {
width: 100%;
height: auto;
display: block;
cursor: pointer;
}
.ad-card__close,
.ad-card__skip-timer {
position: absolute;
top: 8px;
right: 8px;
background: rgba(0, 0, 0, 0.6);
color: #fff;
border: none;
border-radius: 50%;
width: 28px;
height: 28px;
font-size: 12px;
z-index: 2;
}
.ad-card__skip-timer {
border-radius: 14px;
width: auto;
padding: 0 10px;
}
/* ── Полноэкранная реклама (триггер по активному скроллу ленты) ── */
.fs-ad-overlay {
position: fixed;
inset: 0;
z-index: 300; /* выше всех модалок (.f-viewer-bg = 200, .f-modal-bg = 100) */
background: #000;
display: flex;
align-items: center;
justify-content: center;
animation: mfadeIn .2s ease;
cursor: pointer;
}
.fs-ad-video {
width: 100%;
height: 100%;
object-fit: contain;
display: block;
}
.fs-ad-label {
position: absolute;
top: 16px;
left: 16px;
background: rgba(0, 0, 0, 0.6);
color: #fff;
font-size: 11px;
padding: 2px 8px;
border-radius: 4px;
z-index: 2;
}
.fs-ad-close,
.fs-ad-skip-timer {
position: absolute;
top: 16px;
right: 16px;
background: rgba(0, 0, 0, 0.6);
color: #fff;
border: none;
z-index: 2;
}
.fs-ad-skip-timer {
border-radius: 20px;
padding: 8px 16px;
font-size: 13px;
font-weight: 600;
}
.fs-ad-close {
width: 40px;
height: 40px;
border-radius: 50%;
font-size: 16px;
cursor: pointer;
transition: background .15s;
}
.fs-ad-close:hover {
background: rgba(0, 0, 0, 0.85);
}
.fs-ad-sound {
position: absolute;
bottom: 16px;
right: 16px;
width: 40px;
height: 40px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.6);
border: none;
color: #fff;
font-size: 16px;
cursor: pointer;
z-index: 2;
transition: background .15s;
}
.fs-ad-sound:hover {
background: rgba(0, 0, 0, 0.85);
}