/* =====================================================
   Person Card
   Grave entry module
===================================================== */

/*
 * WG Card upravlja:
 * - pozadinom
 * - borderom
 * - radiusom
 * - shadowom
 * - headerom
 * - naslovom
 * - opisom
 * - osnovnim body paddingom
 */


.person-card__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    background: #f4f8f5;
    border: 1px solid rgba(31, 75, 57, 0.1);
    border-radius: 14px;
}

.person-card__avatar {
    display: grid;
    place-items: center;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    color: #39785a;
    background: #e4efe8;
    border-radius: 50%;
    font-size: 1.45rem;
}

.person-card__identity-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.2rem;
}

.person-card__eyebrow {
    color: #78847d;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.person-card__identity-text strong {
    overflow-wrap: anywhere;
    color: #244e3b;
    font-size: 1.05rem;
    font-weight: 700;
}

.person-card__identity-text > span:last-child {
    color: #6e7a73;
    font-size: 0.87rem;
}

/* Forma */

.person-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.person-field {
    min-width: 0;
}

.person-field--full {
    grid-column: 1 / -1;
}

.person-field > label {
    display: block;
    margin-bottom: 0.45rem;
    color: #43534a;
    font-size: 0.8rem;
    font-weight: 700;
}

.person-field input,
.person-field select,
.person-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 0.7rem 0.8rem;
    color: #263c31;
    background: #ffffff;
    border: 1px solid rgba(44, 79, 61, 0.2);
    border-radius: 10px;
    outline: none;
    font-size: 0.95rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.person-field textarea {
    min-height: 110px;
    resize: vertical;
}

.person-field input:focus,
.person-field select:focus,
.person-field textarea:focus {
    border-color: #39785a;
    box-shadow: 0 0 0 3px rgba(57, 120, 90, 0.13);
}

.person-field input::placeholder,
.person-field textarea::placeholder {
    color: #9aa49e;
}

/* Helper tekst */

.person-field__help {
    display: block;
    margin-top: 0.4rem;
    color: #78847d;
    font-size: 0.78rem;
    line-height: 1.45;
}

/* Greške validacije */

.person-field__errors {
    margin: 0.45rem 0 0;
    padding: 0;
    color: #8a302f;
    font-size: 0.82rem;
    list-style: none;
}

.person-field__errors li + li {
    margin-top: 0.2rem;
}

/* Mobilni prikaz */

@media (max-width: 768px) {
    .person-form-grid {
        grid-template-columns: 1fr;
    }

    .person-field--full {
        grid-column: auto;
    }
}

@media (max-width: 576px) {
    .person-card__identity {
        align-items: flex-start;
        padding: 0.9rem;
    }

    .person-card__avatar {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }
}


/* =====================================================
   Person Summary Card
   Prikaz osobe na detalju groba
===================================================== */

.person-summary-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    padding: 1.25rem;
}

.person-summary-card__visual {
    width: 150px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(31, 75, 57, 0.12);
    border-radius: 14px;
    background: #f1f5f2;
}

.person-summary-card__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-summary-card__fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #39785a;
    background: #eaf2ed;
    font-size: 2.5rem;
}

.person-summary-card__content {
    min-width: 0;
    padding-top: 0.15rem;
}

.person-summary-card__name {
    margin: 0 0 0.55rem;
    color: #234f3b;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.person-summary-card__dates {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    color: #495057;
    font-weight: 600;
}

.person-summary-card__date-text {
    margin-bottom: 0.75rem;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
}

.person-summary-card__notes {
    margin: 0;
    color: #59655f;
    line-height: 1.65;
}

/* Mobilni prikaz */

@media (max-width: 576px) {
    .person-summary-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 0.9rem;
        align-items: start;
        padding: 0.9rem;
    }

    .person-summary-card__visual {
        width: 96px;
        aspect-ratio: 3 / 4;
        margin: 0;
    }

    .person-summary-card__photo,
    .person-summary-card__fallback {
        width: 100%;
        height: 100%;
        min-height: 128px;
    }

    .person-summary-card__content {
        padding-top: 0.1rem;
        text-align: left;
    }

    .person-summary-card__dates {
        justify-content: flex-start;
    }

    .person-summary-card__name {
        font-size: 1.05rem;
    }

    .person-summary-card__date-text,
    .person-summary-card__notes {
        font-size: 0.88rem;
    }
}



/* ==========================================================
   WG-PERSON-001
   Heritage Person Panel
   WGDS v1.0
========================================================== */

.wg-person {
    width:100%;
    box-sizing:border-box;
    display: grid;
    grid-template-columns:150px minmax(0,1fr);
    gap: 2rem;
    align-items: start;
    padding: 1.5rem;
}

.wg-person__frame {
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(31, 75, 57, 0.18);
    background: #faf8f3;
    border-radius: 14px;
}

.wg-person__photo {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
}

.wg-person__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    color: #39785a;
    background: #eef4f0;
    border-radius: 10px;
    font-size: 2.5rem;
}

.wg-person__content {
    min-width: 0;
    display:flex;
    flex-direction:column;
    justify-content:center;
    height:100%;
}

.wg-person__header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(31, 75, 57, 0.12);
}

.wg-person__name {
    margin: 0;
    color: #234f3b;
    font-size:1.55rem;
    font-weight: 700;
    line-height: 1.3;
}

.wg-person__years {
    margin: 0.45rem 0 0;
    color: #66736c;
    font-size: 1rem;
    font-weight: 600;
}

.wg-person__notes {
    margin-top:.75rem;
    color: #59655f;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .wg-person {
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .wg-person {
        grid-template-columns: 1fr;
    }

    .wg-person__frame {
        width: min(180px, 100%);
        margin-inline: auto;
    }

    .wg-person__content {
        text-align: center;
    }
}