/* Cat page. */

.cat-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

@media (max-width: 560px) {
    .cat-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cat-facts {
        text-align: left;
    }
}

.cat-portrait {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2f6d5a;
    flex-shrink: 0;
}

.cat-portrait-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2f6d5a;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 2.4em;
}

.cat-header-body {
    min-width: 0;
}

.cat-header-body h1 {
    margin-top: 0;
}

.cat-home-link {
    color: #5a6b62;
    margin-top: 0;
}

.cat-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 14px;
    margin: 8px 0;
}

.cat-facts dt {
    color: #5a6b62;
    font-size: 0.9em;
}

.cat-facts dd {
    margin: 0;
}

/* Gallery */

.cat-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 16px;
}

.cat-gallery-item {
    flex-shrink: 0;
    text-align: center;
}

.cat-gallery-item img {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #d5ddd2;
}

.cat-gallery-item img:hover {
    border-color: #2f6d5a;
}

/* Columns */

.cat-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

@media (min-width: 820px) {
    .cat-columns {
        grid-template-columns: 1.2fr 1fr;
        gap: 24px;
    }
}

.cat-map {
    height: 340px;
}

@media (max-width: 700px) {
    .cat-map {
        height: 45vh;
        min-height: 260px;
    }
}

.sighting-form {
    margin-top: 10px;
}

.sighting-list {
    padding-left: 20px;
}

.sighting-list li {
    margin: 6px 0;
}

.sighting-date {
    color: #5a6b62;
    font-size: 0.85em;
    margin-right: 8px;
}

.relation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.relation-list li {
    padding: 8px 10px;
    margin-bottom: 8px;
    border: 1px solid #d5ddd2;
    border-radius: 8px;
    background: #fdfdfc;
}

.relation-list small {
    display: block;
    color: #5a6b62;
}

.relation-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    color: #fff;
    margin-right: 8px;
}

.relation-friend .relation-badge {
    background: #2f6d5a;
}

.relation-fight .relation-badge {
    background: #b0552b;
}

/* Lightbox for originals, loaded on click. */

.cat-portrait-clickable,
.cat-gallery-item img {
    cursor: pointer;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(20, 25, 22, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* display: flex above would override the hidden attribute,
   so hide explicitly when hidden is set. */
.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: 94vw;
    max-height: 94vh;
    border-radius: 6px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Comments on reports. */

.comment-list {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0 0 0 12px;
    border-left: 3px solid #d5ddd2;
}

.comment-list li {
    border: none;
    background: none;
    padding: 4px 0;
    margin: 0;
}

.comment-head {
    display: block;
    font-size: 0.85em;
}

.comment-form {
    margin-top: 6px;
}

.comment-form summary,
.admin-tools summary {
    cursor: pointer;
    color: #2f6d5a;
    font-size: 0.9em;
}

.comment-form form {
    margin-top: 6px;
}

/* Small admin controls on reports and comments. */

.admin-tools {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 4px;
}

.admin-tools form {
    display: inline;
}

.small-button {
    margin-top: 6px;
    padding: 4px 12px;
    font-size: 0.85em;
}

.small-button-danger {
    background: #b0552b;
    margin-top: 0;
}

.small-button-danger:hover {
    background: #8f421f;
}

/* Missing cat status. */

.missing-alert {
    background: #f7e8de;
    border: 1px solid #b0552b;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.missing-alert h2 {
    margin-top: 0;
    color: #8f421f;
}

.missing-alert .missing-status {
    font-weight: bold;
    color: #8f421f;
}

.missing-report {
    margin: 10px 0;
}

.missing-report summary {
    cursor: pointer;
    color: #2f6d5a;
    font-size: 0.9em;
}

.sighting-latest {
    background: #f7e8de;
    border-radius: 6px;
    padding: 4px 8px;
}
