/* CarkedIt Online — Living Dead Profile Component */

/* ── Container ── */

.ld-profile {
  background: color-mix(in srgb, var(--color-white) 10%, transparent);
  border-radius: 10px;
  box-shadow: 0 4px 6px var(--color-shadow-sm), 0 2px 4px var(--color-shadow-sm);
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

/* ── Hero: name + birthday + card thumbnails ── */

.ld-profile__hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.ld-profile__name {
  font-size: 4rem; /* overridden by inline style — fallback only */
  font-weight: 900;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
}

.ld-profile__birthday {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Card thumbnail row ── */

.ld-profile__cards {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ld-profile__card-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 10px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
}

.ld-profile__card-thumb:hover,
.ld-profile__card-thumb:active {
  background: color-mix(in srgb, var(--color-white) 8%, transparent);
}

.ld-profile__card-img-wrap {
  width: 90px;
  height: 126px; /* 90 × 7/5 — explicit to guarantee portrait */
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--color-border);
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.ld-profile__card-thumb:hover .ld-profile__card-img-wrap,
.ld-profile__card-thumb:active .ld-profile__card-img-wrap {
  border-color: color-mix(in srgb, var(--color-white) 70%, transparent);
}

.ld-profile__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ld-profile__card-placeholder {
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--color-white) 8%, transparent);
}

.ld-profile__card-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  white-space: nowrap;
}

/* ── Submitted cards face-down row ── */

.ld-profile__submitted {
  display: grid;
  gap: 6px;
  width: 100%;
  flex-shrink: 0;
}

.ld-profile__submitted--cols-1 {
  grid-template-columns: repeat(1, 1fr);
  max-width: 33.33%;
  margin: 0 auto;
}

.ld-profile__submitted--cols-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 66.67%;
  margin: 0 auto;
}

.ld-profile__submitted--cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.ld-profile__submitted--cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.ld-profile__submitted-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

/* Card fills column width; max-height:100% lets it shrink when vertical space is tight */
.ld-profile__submitted-card .card-back,
.ld-profile__submitted-card .card {
  width: 100%;
  max-height: 100%;
  border-radius: 6px;
}

.ld-profile__submitted-label {
  position: absolute;
  bottom: 3px;
  left: 0;
  right: 0;
  font-size: 9px;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 1px 3px var(--color-shadow-sm);
  pointer-events: none;
  z-index: 2;
  opacity: 0.9;
}

/* ── Hint text ── */

.ld-profile__hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  flex-shrink: 0;
  padding-top: 4px;
}
