/* Member app styles (on top of base.css and layout.css). */

/* Status banner under the top bar (AdminLTE "callout") */
.status-banner {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 20px 0;
  padding: 12px 16px; background: var(--card); border-left: 5px solid var(--warning);
  border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 600;
}
.status-banner span { flex: 1; min-width: 200px; }
.status-banner.grace { border-left-color: #fd7e14; }
.status-banner.locked { border-left-color: var(--danger); }
.status-banner svg.icon { color: var(--muted); }
@media (max-width: 991px) { .status-banner { margin: 14px 14px 0; } }

/* Home */
.icon-thumb { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.datebox { flex: none; width: 48px; text-align: center; border-radius: var(--radius); background: var(--brand); color: var(--brand-ink); padding: 5px 0; line-height: 1.1; }
.datebox b { display: block; font-size: 19px; }
.datebox span { font-size: 11px; text-transform: uppercase; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.news-grid .card { margin: 0; }
.post-card { display: block; color: inherit; text-decoration: none; }
.post-card:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.post-card .thumb-wide { width: calc(100% + 40px); margin: -16px -20px 12px; height: 170px; object-fit: cover; display: block; border-radius: var(--radius) var(--radius) 0 0; }
.post-card h2 { margin: 0 0 4px; font-size: 18px; border: 0; padding: 0; }
.post-card .excerpt { color: var(--muted); margin: 8px 0 0; }
.post-image { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius); margin-bottom: 12px; display: block; }
.post-body p { margin: 0 0 12px; overflow-wrap: anywhere; }
.post-full h1 { margin-bottom: 4px; }
a.brand { color: inherit; text-decoration: none; }

/* Calendar page: month grid with the chosen day beside it */
.day-panel h2 { text-transform: none; }
.event { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.event .info { flex: 1; min-width: 0; }
.event .info h3 { margin: 0 0 2px; overflow-wrap: anywhere; }
.event .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.event-details { white-space: pre-line; margin: 6px 0 0; overflow-wrap: anywhere; }

/* Pay */
.big-amount { font-size: 38px; font-weight: 700; margin: 4px 0 8px; }
.bank { display: grid; grid-template-columns: max-content 1fr auto; gap: 10px 12px; align-items: center; margin: 0; }
.bank dt { color: var(--muted); font-size: 14px; }
.bank dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.bank .ref { font-size: 22px; letter-spacing: 2px; color: var(--brand); }
@media (prefers-color-scheme: dark) { .bank .ref { color: color-mix(in srgb, var(--brand) 45%, #fff); } }
.bank + p { margin-top: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
.check input { margin-top: 4px; }
.narrow-page { max-width: 720px; }

/* Contacts */
.emergency-card { border-top-color: var(--danger) !important; }
.emergency-card .button.call { background: var(--danger); border-color: var(--danger); color: #fff; font-size: 17px; min-width: 96px; flex: none; font-weight: 600; }
.list > li.stack { flex-direction: column; align-items: stretch; gap: 4px; }
.contact-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.contact-actions .button { min-height: 32px; padding: 3px 10px; font-size: 13.5px; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .contacts-grid { grid-template-columns: 1fr; } }
.card input[type=search] { margin-bottom: 4px; }
.month { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 4px; }

/* Marketplace */
.chip-row { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 12px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row button { flex: none; min-height: 30px; padding: 3px 12px; font-size: 13.5px; border-radius: 999px; }
.chip-row button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .market-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.market-grid .empty { grid-column: 1 / -1; }
.market-card { display: block; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: inherit; text-decoration: none; }
.market-card:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.market-thumb, .gallery-frame { position: relative; aspect-ratio: 1 / 1; background: var(--line); overflow: hidden; }
.market-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-photo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.market-info { padding: 8px 10px 10px; }
.market-price { font-weight: 700; color: var(--brand); }
@media (prefers-color-scheme: dark) { .market-price { color: color-mix(in srgb, var(--brand) 45%, #fff); } }
.market-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Red diagonal SOLD banner, as on the sales site */
.market-card.sold .market-thumb::after, .gallery.sold .gallery-frame::after {
  content: "SOLD"; position: absolute; top: 50%; left: 50%; width: 160%;
  transform: translate(-50%, -50%) rotate(-30deg); background: #d0201a; color: #fff;
  text-align: center; font-weight: 800; letter-spacing: .2em; font-size: 20px; padding: 5px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); pointer-events: none;
}
.market-card.sold img, .gallery.sold img { filter: grayscale(.5); }
.item-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .item-layout { grid-template-columns: 1fr; } }
.gallery { margin-bottom: 16px; }
.gallery-frame { border-radius: var(--radius); aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.gallery-main { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.no-photo.big { font-size: 16px; }
.gallery-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.gallery-thumbs button { padding: 0; width: 60px; height: 60px; min-height: 0; border-radius: var(--radius); overflow: hidden; flex: none; border: 2px solid transparent; }
.gallery-thumbs button.on { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.photo-grid figure { margin: 0; position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.photo-grid figure img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.photo-grid figure.pending { opacity: .8; border-style: dashed; }
.photo-grid .cover-tag { position: absolute; top: 6px; left: 6px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.photo-actions { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; }
.photo-actions .small { min-height: 26px; padding: 2px 8px; font-size: 12px; }
.add-photo { aspect-ratio: 1 / 1; border-style: dashed; color: var(--muted); }
.form-end { margin-top: 8px; }
dialog.sheet { border: 0; border-radius: var(--radius); padding: 0; width: min(500px, calc(100vw - 32px)); background: var(--card); color: var(--text); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
dialog.sheet form { padding: 16px 20px; }
dialog.sheet h2 { margin: -16px -20px 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); border-top: 3px solid var(--brand); font-weight: 400; }
dialog.sheet::backdrop { background: rgba(0,0,0,.5); }

/* Marketplace: an own item close to being removed */
.market-card .expiring { color: var(--warning); font-weight: 600; }
