/* NEVV Community Profile Items - layout only. CORE controls visual style. */

.ncpi-card,
.ncpi-panel,
.ncpi-root,
.ncpi-editor-shell,
.ncpi-list,
.ncpi-editor-form,
.ncpi-editor-form-wide {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.ncpi-card {
    overflow: hidden;
}

.ncpi-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

.ncpi-add-button,
.ncpi-disabled,
.ncpi-exit-button,
.ncpi-save-button,
.ncpi-edit-button,
.ncpi-danger,
.ncpi-move-button {
    text-decoration: none !important;
    white-space: nowrap;
}

.ncpi-notice {
    margin-bottom: 14px;
}

.ncpi-list {
    display: grid;
    gap: 14px;
}

.ncpi-empty {
    margin: 0;
}

.ncpi-item-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
}

.ncpi-item-title {
    margin: 0 0 10px;
}

.ncpi-item-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.ncpi-item-card dl div {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 10px;
}

.ncpi-item-card dt,
.ncpi-item-card dd {
    min-width: 0;
}

.ncpi-item-card dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.ncpi-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.ncpi-actions form {
    margin: 0;
    display: inline-flex;
}

.ncpi-move-button {
    min-width: var(--nevv-button-height, 42px);
}

.ncpi-editor-actions .nevv-btn {
    width: 100%;
}

.ncpi-editor-shell {
    display: grid;
    align-content: start;
    gap: 16px;
}

.ncpi-editor-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-bottom: 8px;
}

.ncpi-editor-form {
    display: grid;
    gap: 14px;
}

.ncpi-field {
    display: grid;
    gap: 7px;
}

.ncpi-field .nevv-input,
.ncpi-field .nevv-select,
.ncpi-field .nevv-textarea {
    width: 100%;
    box-sizing: border-box;
}

.ncpi-field .nevv-textarea {
    min-height: 160px;
}

.ncpi-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.ncpi-editor-actions .nevv-btn {
    min-width: 180px;
}

.ncu-profile-section .ncpi-editor-shell,
.ncu-profile-section[data-ncu-section^="pi-"] .ncpi-editor-shell {
    width: 100%;
    max-width: none;
}

@media (max-width: 760px) {
    .ncpi-item-card {
        grid-template-columns: 1fr;
    }

    .ncpi-item-card dl div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .ncpi-actions {
        justify-content: stretch;
    }

    .ncpi-actions .nevv-btn,
    .ncpi-actions form {
        width: 100%;
    }

    .ncpi-edit-button {
        margin-left: 0;
    }

    .ncpi-editor-actions {
        justify-content: stretch;
    }

    .ncpi-editor-actions .nevv-btn {
        width: 100%;
        min-width: 0;
    }
}


/* CORE button variant bridge.
   This block uses ONLY global CORE variables.
   It exists to neutralize older module selectors that may override .nevv-btn-* variants.
   Do not put hardcoded colors/heights/radius here. */
.ncpi-root .nevv-btn-save,
.ncpi-root button.nevv-btn-save,
.ncpi-root a.nevv-btn-save {
    background: var(--nevv-color-button-save, var(--nevv-color-primary)) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}

.ncpi-root .nevv-btn-delete,
.ncpi-root .nevv-btn-danger,
.ncpi-root button.nevv-btn-delete,
.ncpi-root button.nevv-btn-danger,
.ncpi-root a.nevv-btn-delete,
.ncpi-root a.nevv-btn-danger {
    background: var(--nevv-color-button-delete, #dc2626) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}

.ncpi-root .nevv-btn-edit,
.ncpi-root button.nevv-btn-edit,
.ncpi-root a.nevv-btn-edit {
    background: var(--nevv-color-button-edit, var(--nevv-color-primary)) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}

.ncpi-root .nevv-btn-function,
.ncpi-root button.nevv-btn-function,
.ncpi-root a.nevv-btn-function {
    background: var(--nevv-color-button-function, var(--nevv-color-primary)) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}

.ncpi-root .nevv-btn-save:hover,
.ncpi-root .nevv-btn-delete:hover,
.ncpi-root .nevv-btn-danger:hover,
.ncpi-root .nevv-btn-edit:hover,
.ncpi-root .nevv-btn-function:hover {
    background: var(--nevv-color-primary-hover) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}

.ncpi-root .nevv-btn-save:active,
.ncpi-root .nevv-btn-delete:active,
.ncpi-root .nevv-btn-danger:active,
.ncpi-root .nevv-btn-edit:active,
.ncpi-root .nevv-btn-function:active,
.ncpi-root .nevv-btn-save.is-active,
.ncpi-root .nevv-btn-delete.is-active,
.ncpi-root .nevv-btn-danger.is-active,
.ncpi-root .nevv-btn-edit.is-active,
.ncpi-root .nevv-btn-function.is-active {
    background: var(--nevv-color-primary-active) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}

