/**
 * @pm-registry
 * @prefix      pm
 * @type css-class
 * @name theme-clean-people
 * @description Layout and card styles for the People & Places panel.
 * @called-by  none found
 * @depends-on --pm-background
 * @tags        TODO
 * @updated 2026-04-19
 */

/* ═══════════════════════════════════════════════
   PANEL LAYOUT
   ═══════════════════════════════════════════════ */

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-people-section-header
 * @tags        people
 * @description Sticky header for a section in the People & Places registry, holding a label and optional actions.
 * @depends-on  --pm-background
 * @called-by  pm-panel-people.html
 * @updated     2026-04-20
 */
.pm-people-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px 10px;
    background: var(--pm-background);
    position: sticky;
    top: 0;
    z-index: 10;
}

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-section-label
 * @tags        people
 * @description Small, uppercase, bold label for sections within the People & Places registry.
 * @depends-on  --pm-text-3
 * @called-by  pm-modal-people-categories.html, pm-modal-place-categories.html, pm-panel-calendar.html, pm-panel-people.html
 * @updated     2026-04-20
 */
.pm-section-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pm-text-3);
}

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-people-list
 * @tags        people
 * @description Flex column container for person cards in the People & Places registry, providing consistent spacing and gap.
 * @depends-on  pm-card-person
 * @called-by  pm-panel-people.html
 * @updated     2026-04-20
 */
.pm-people-list,
/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-places-list
 * @tags        people
 * @description Flex column container for place cards in the People & Places registry, providing consistent spacing and gap.
 * @depends-on  pm-card-place
 * @called-by  pm-panel-people.html
 * @updated     2026-04-20
 */
.pm-places-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 16px 20px;
}

/* ═══════════════════════════════════════════════
   PERSON CARD
   ═══════════════════════════════════════════════ */

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-card-person
 * @tags        people
 * @description Interactive flex container for a person card, featuring a shadow, border, and avatar spacing.
 * @depends-on  --pm-panel-surface, --pm-radius-small, --pm-shadow-small, --pm-border
 * @called-by  pm-panel-people.html
 * @updated     2026-04-20
 */
.pm-card-person {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--pm-panel-surface);
    border-radius: var(--pm-radius-small);
    padding: 14px 14px;
    box-shadow: var(--pm-shadow-small);
    cursor: pointer;
    border: 1px solid var(--pm-border);
    transition: box-shadow 0.15s, transform 0.1s;
    margin-bottom: 12px;
}

.pm-card-person:active {
    transform: scale(0.98);
    box-shadow: none;
}

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-card-person-thumb
 * @tags        people
 * @description Circular avatar thumbnail with gradient background for a person card.
 * @depends-on  pm-card-person, --pm-home-gradient-start, --pm-home-gradient-end
 * @called-by  none found
 * @updated     2026-04-20
 */
.pm-card-person-thumb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--pm-home-gradient-start), var(--pm-home-gradient-end));
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════
   PLACE CARD
   ═══════════════════════════════════════════════ */

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-card-place
 * @tags        people
 * @description Interactive flex container for a place card, mirroring the memory and person card styles.
 * @depends-on  --pm-panel-surface, --pm-radius-small, --pm-shadow-small, --pm-border
 * @called-by  pm-panel-people.html
 * @updated     2026-04-20
 */
.pm-card-place {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--pm-panel-surface);
    border-radius: var(--pm-radius-small);
    padding: 14px 14px;
    box-shadow: var(--pm-shadow-small);
    cursor: pointer;
    border: 1px solid var(--pm-border);
    transition: box-shadow 0.15s, transform 0.1s;
    margin-bottom: 12px;
}

.pm-card-place:active {
    transform: scale(0.98);
    box-shadow: none;
}

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-card-place-thumb
 * @tags        people
 * @description Square-rounded gradient thumbnail for a place card, representing location assets.
 * @depends-on  pm-card-place, --pm-home-gradient-start, --pm-home-gradient-end
 * @called-by  none found
 * @updated     2026-04-20
 */
.pm-card-place-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--pm-radius-small);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--pm-home-gradient-start), var(--pm-home-gradient-end));
}

/* ═══════════════════════════════════════════════
   INLINE ADD FORMS
   ═══════════════════════════════════════════════ */

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-add-form-row
 * @tags        people
 * @description Dashed-border container for inline forms, used to add new people or places.
 * @depends-on  --pm-brand-light, --pm-brand, --pm-radius-medium
 * @called-by  none found
 * @updated     2026-04-20
 */
.pm-add-form-row {
    background: var(--pm-brand-light);
    border: 1px dashed var(--pm-brand);
    border-radius: var(--pm-radius-medium);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-add-form-actions
 * @tags        people
 * @description Flex container for action buttons (Cancel/Save) at the bottom of the inline add form.
 * @depends-on  pm-add-form-row
 * @called-by  none found
 * @updated     2026-04-20
 */
.pm-add-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

/* ═══════════════════════════════════════════════
   PEOPLE CATEGORIES MODAL
   ═══════════════════════════════════════════════ */

/**
 * @pm-registry
 * @prefix pm
 * @description Card wrapper for a section (Primary Category or Circles) inside the people categories modal.
 * @apps project-memory
 * @type        css-class
 * @name        pm-cat-modal-section
 * @tags        TODO
 * @called-by   pm-modal-people-categories.html, pm-modal-place-categories.html
 * @depends-on  --pm-surface-2, --pm-border, --pm-radius-medium
 * @updated 2026-04-19
 */
.pm-cat-modal-section {
    background: var(--pm-surface-2);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-medium);
    padding: 14px;
    margin-bottom: 14px;
}

.pm-cat-modal-section .pm-note-categories-list {
    max-height: none;
}

/**
 * @pm-registry
 * @prefix pm
 * @description Header row inside pm-cat-modal-section — label left, action buttons right.
 * @apps project-memory
 * @type        css-class
 * @name        pm-cat-section-header
 * @tags        TODO
 * @called-by   pm-modal-people-categories.html, pm-modal-place-categories.html
 * @depends-on  none
 * @updated 2026-04-19
 */
.pm-cat-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════
   MODAL SPECIFICS
   ═══════════════════════════════════════════════ */

.pf-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--pm-border);
}

.pf-label {
    color: var(--pm-text-3);
    font-size: 0.9rem;
}

.pf-value {
    font-weight: 500;
    color: var(--pm-text-1);
}

.pf-section-label {
    margin-top: 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--pm-text-2);
    margin-bottom: 8px;
}

.pf-fact {
    padding: 4px 0;
    line-height: 1.4;
    color: var(--pm-text-1);
}

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-avatar-img
 * @tags        people
 * @description Standard avatar image styling with cover fitting and inherited border-radius.
 * @called-by  none found
 * @depends-on none
 * @updated     2026-04-20
 */
.pm-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* ═══════════════════════════════════════════════
   EDIT MODAL PREVIEWS
   ═══════════════════════════════════════════════ */

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-edit-avatar-preview-container
 * @tags        people
 * @description Centered flex container for the large avatar preview in person/place edit modals.
 * @called-by  pm-modal-person-edit.html, pm-modal-person-facts.html, pm-modal-place-edit.html, pm-modal-place-facts.html
 * @depends-on none
 * @updated     2026-04-20
 */
.pm-edit-avatar-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-edit-avatar-preview
 * @tags        people
 * @description Large avatar preview box with brand gradient and medium shadow, used in edit modals.
 * @depends-on  --pm-home-gradient-start, --pm-home-gradient-end, --pm-shadow-medium
 * @called-by  pm-modal-person-edit.html, pm-modal-person-facts.html, pm-modal-place-edit.html, pm-modal-place-facts.html
 * @updated     2026-04-20
 */
.pm-edit-avatar-preview {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--pm-home-gradient-start), var(--pm-home-gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    box-shadow: var(--pm-shadow-medium);
    transition: transform 0.1s ease;
    overflow: hidden;
}

.pm-edit-avatar-preview:active {
    transform: scale(0.95);
}

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-edit-avatar-preview--person
 * @tags        people
 * @description Modifier class that applies a circular border-radius to the avatar preview for people.
 * @depends-on  pm-edit-avatar-preview
 * @called-by  pm-modal-person-edit.html, pm-modal-person-facts.html
 * @updated     2026-04-20
 */
.pm-edit-avatar-preview--person {
    border-radius: 50%;
}

/**
 * @pm-registry
 * @prefix      pm
 * @type        css-class
 * @name        pm-edit-avatar-preview--place
 * @tags        people
 * @description Modifier class that applies a rounded-square border-radius to the avatar preview for places.
 * @depends-on  pm-edit-avatar-preview
 * @called-by  pm-modal-place-edit.html, pm-modal-place-facts.html
 * @updated     2026-04-20
 */
.pm-edit-avatar-preview--place {
    border-radius: var(--pm-radius-small);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — small phones
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
    .pm-people-section-header {
        padding-left: 0;
        padding-right: 0;
    }
    .pm-people-list,
    .pm-places-list {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 420px) {
    .pm-cat-modal-section {
        padding: 10px;
    }
    .pm-cat-section-header {
        gap: 6px;
    }
    .pm-section-label {
        font-size: 0.78rem;
    }
}
