/* --- File: ./static/css/pages/profile_overview.css --- */
/* Spezifische Stile nur für die Steckbrief-Übersicht (rat_profiles_overview.html) */

/* Verhindert das Aufblitzen von Inhalten, bevor JS die Filter anwendet */
.js-initial-hide {
    visibility: hidden;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 256px);
    gap: 1.5rem;
    padding: 1.25rem 0;
    justify-content: center;
}

#deceased-profile-grid-container {
    padding: 1.25rem 0;
    justify-content: center;
}

.profile-card {
    background-color: var(--box-bg-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 6px 12px var(--box-shadow-color);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--box-text-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
    border: none;
    width: 256px;
    height: auto;
    position: relative;
    box-sizing: border-box;
}

.profile-card.hidden {
    opacity: 0.1;
    pointer-events: none;
    transform: scale(0.95);
    display: none;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--box-shadow-color);
    text-decoration: none;
}

.profile-card:hover h2 {
    color: var(--link-hover-color);
    text-decoration: underline;
}


.profile-card .thumbnail-container {
    width: 100%;
    height: 180px;
    background-color: var(--input-bg);
    border-bottom: 1px solid var(--border-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.profile-card img.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card .thumbnail-container .icon-placeholder {
    color: var(--text-color-very-light);
    font-size: 3em;
}

.profile-card .thumbnail-container.deceased-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 35px 35px 0 0;
    border-color: rgba(0, 0, 0, 0.6) transparent transparent transparent;
    z-index: 1;
    pointer-events: none;
}

.profile-card .guest-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--btn-edit-bg);
    color: var(--btn-edit-text);
    padding: 3px 7px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.profile-card .card-content {
    padding: 0.9375rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 256px;
    box-sizing: border-box;
}

.profile-card h2 {
    margin: 0 0 0.625rem 0;
    font-size: 1.4rem;
    color: var(--box-h2-color);
    border: none;
    padding: 0;
    display: flex;
    align-items: baseline;
    flex-shrink: 0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.profile-card .rat-color-indicator {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.profile-card p.visual-description {
    margin: 0 0 0.625rem 0;
    font-size: 0.9rem;
    flex-grow: 1;
    line-height: 1.5;
    color: var(--box-text-light);
    font-style: italic;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    min-height: initial;
    text-decoration: none !important;
}

.profile-card .details {
    font-size: 0.75rem;
    color: var(--text-color-very-light);
    margin-top: auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3125rem 0.9375rem;
    border-top: 1px solid var(--border-color-light);
    padding-top: 0.5rem;
    margin-top: 0.625rem;
    flex-shrink: 0;
    text-decoration: none !important;
}

.profile-card .details span {
    white-space: nowrap;
}

.profile-card .details i {
    margin-right: 3px;
}

.profile-grid.list-mode {
    display: flex;
    flex-direction: column;
    gap: 0.9375rem;
}

.profile-grid.list-mode .profile-card {
    flex-direction: row;
    width: 100%;
    height: auto !important;
    align-items: flex-start;
    gap: 0.9375rem;
    padding: 0.625rem;
    box-sizing: border-box;
}

.profile-grid.list-mode .card-content {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-height: 75px;
    height: auto;
}

.profile-grid.list-mode .thumbnail-container {
    width: 100px;
    height: 75px;
    border-bottom: none;
    border-right: 1px solid var(--border-color-light);
    flex-shrink: 0;
    border-radius: 0.375rem;
}

.profile-grid.list-mode .thumbnail-container.deceased-indicator::after {
    border-width: 25px 25px 0 0;
}

.profile-grid.list-mode h2 {
    margin-bottom: 0.3125rem;
    font-size: 1.3rem;
}

.profile-grid.list-mode p.visual-description {
    font-size: 0.9rem;
    flex-grow: 1;
    font-style: normal;
    color: var(--box-text-color);
    margin-bottom: 0.5rem;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    min-height: initial;
}

.profile-grid.list-mode .details {
    margin-top: auto;
    padding-top: 0.3125rem;
    border-top: 1px solid var(--border-color-light);
    flex-wrap: nowrap;
    gap: 0.9375rem;
    justify-content: flex-start;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.rainbow-bridge-heading {
    display: none;
    margin-bottom: 1.5rem;
}

.no-data-msg-filter,
.no-data-msg-deceased {
    text-align: center;
    margin-top: 30px;
    display: none;
    color: var(--text-color-light);
    font-style: italic;
}

/* --- Skeleton Loading Styles --- */
@keyframes skeleton-pulse {
  0% { background-color: var(--input-bg); }
  50% { background-color: var(--box-border-color); }
  100% { background-color: var(--input-bg); }
}

.profile-card.skeleton {
    cursor: progress;
    pointer-events: none;
}
.profile-card.skeleton:hover {
    transform: none;
    box-shadow: 0 6px 12px var(--box-shadow-color);
}
.profile-card.skeleton .thumbnail-container {
    animation: skeleton-pulse 1.8s ease-in-out infinite;
}
.profile-card.skeleton .skeleton-text {
    background-color: var(--input-bg);
    border-radius: 4px;
    animation: skeleton-pulse 1.8s ease-in-out infinite;
    color: transparent;
    user-select: none;
}
.profile-card.skeleton h2 .skeleton-text {
    width: 70%;
    height: 1.4rem;
    margin-bottom: 0.625rem;
}
.profile-card.skeleton .visual-description .skeleton-text {
    height: 0.9rem;
    margin-bottom: 0.4rem;
}
.profile-card.skeleton .visual-description .skeleton-text:last-child {
    width: 80%;
}
.profile-card.skeleton .details .skeleton-text {
    width: 60px;
    height: 0.75rem;
}

.no-description {
    color: var(--text-color-very-light);
}

.death-date-icon {
    color: var(--text-color-very-light);
}
