/* Public artist card */
.artistprofile-viewforum-layout,
.artistprofile-card,
.artistprofile-compact,
.artistprofile-revision-card {
    font-family: Scada, Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.artistprofile-viewforum-layout {
    display: grid;
    grid-template-columns: var(--artistprofile-profile-size, 150px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
    margin: 0 0 14px;
}

.artistprofile-viewforum-layout > .forum-title {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    margin-top: 0;
    font-size: 21px;
    line-height: 1.2;
}

.artistprofile-title-photo {
    position: relative;
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
}

.artistprofile-title-photo-fallback {
    float: left;
    margin: 0 16px 10px 0;
}

.artistprofile-card {
    margin: 4px 0 14px;
    padding: 0;
    min-width: 0;
}

.artistprofile-card-with-photo {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    flex-direction: column;
    align-self: stretch;
    margin: 0;
    min-height: 0;
}

.artistprofile-card::after {
    content: "";
    display: block;
    clear: both;
}

.artistprofile-forum-image-link {
    display: inline-block;
    text-decoration: none;
}

.artistprofile-main-photo,
.artistprofile-forum-image {
    display: block;
    object-fit: cover;
    object-position: 50% 35%;
    border-radius: 5px;
}

.artistprofile-main-photo {
    width: var(--artistprofile-profile-size, 150px);
    height: var(--artistprofile-profile-size, 150px);
}

.artistprofile-forum-image {
    width: var(--artistprofile-forum-size, 100px);
    height: var(--artistprofile-forum-size, 100px);
}

.artistprofile-photo-count {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 2px 6px;
    border-radius: 10px;
    color: #fff;
    background: rgba(0, 0, 0, .7);
    font: 400 11px/1.4 Verdana, Arial, sans-serif;
}

.artistprofile-details {
    min-width: 0;
}

.artistprofile-people,
.artistprofile-compact {
    font-family: Scada, Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.artistprofile-person {
    font-weight: 400;
}

.artistprofile-flag {
    width: auto;
    height: 12px;
    margin: 0 2px;
    vertical-align: middle;
}

.artistprofile-links,
.artistprofile-compact-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
}

.artistprofile-service {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    margin: 0 4px 4px 0;
    text-decoration: none;
}

.artistprofile-service img {
    display: block;
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

.artistprofile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: auto;
    padding-top: 10px;
    font-family: Scada, Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

.artistprofile-actions a {
    text-decoration: none;
}

.artistprofile-actions .icon {
    margin-right: 4px;
}

.artistprofile-pending {
    font-weight: 400;
}

.artistprofile-hidden-gallery {
    display: none;
}

/* Editor */
.artistprofile-form-section {
    margin-bottom: 14px;
}

.artistprofile-form-row {
    position: relative;
    margin: 0 0 10px;
    padding: 12px 118px 12px 12px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 5px;
}

.artistprofile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.artistprofile-form-grid .full {
    grid-column: 1 / -1;
}

.artistprofile-form-grid label,
.artistprofile-person-mainline label,
.artistprofile-link-line label,
.artistprofile-russian-name label {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
}

.artistprofile-form-grid input[type="text"],
.artistprofile-form-grid input[type="url"],
.artistprofile-form-grid input[type="number"],
.artistprofile-form-grid select,
.artistprofile-form-grid textarea,
.artistprofile-person-mainline input,
.artistprofile-person-mainline select,
.artistprofile-link-line input,
.artistprofile-link-line select,
.artistprofile-russian-name input {
    box-sizing: border-box;
    width: 100%;
}

.artistprofile-person-mainline {
    display: grid;
    grid-template-columns: minmax(160px, 220px) max-content;
    gap: 10px 14px;
    align-items: end;
    justify-content: start;
}

.artistprofile-country-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    overflow: visible;
    width: max-content;
    max-width: 100%;
    padding-bottom: 2px;
}

.artistprofile-country-fields {
    min-width: 0;
    width: max-content;
    max-width: 100%;
}

.artistprofile-country-item {
    display: grid;
    grid-template-columns: 24px minmax(115px, 165px) auto;
    gap: 5px;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
}

.artistprofile-country-preview {
    display: block;
    width: 24px;
    height: 16px;
    object-fit: contain;
}

.artistprofile-country-preview[hidden] {
    visibility: hidden;
    display: block !important;
}

.artistprofile-country-select {
    min-height: 0;
}

.artistprofile-person-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.artistprofile-action-button .icon {
    margin-right: 5px;
}

.artistprofile-row-tools {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.artistprofile-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 30px;
    height: 28px;
    padding: 0 5px;
}

.artistprofile-icon-button .icon {
    margin: 0;
}

.artistprofile-icon-button:disabled {
    cursor: default;
    opacity: .4;
}

.artistprofile-russian-name {
    max-width: 320px;
    margin-top: 8px;
}

.artistprofile-inline-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.artistprofile-remove-country,
.artistprofile-remove-russian-name {
    flex: 0 0 auto;
}

.artistprofile-link-line {
    display: grid;
    grid-template-columns: minmax(140px, 210px) minmax(260px, 540px) minmax(130px, 220px);
    gap: 10px 12px;
    align-items: end;
    justify-content: start;
}

/* Photo editor: compact cards in a row */
#artistprofile-media-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.artistprofile-existing-photo {
    display: block;
    box-sizing: border-box;
    flex: 0 0 146px;
    width: 146px;
    margin: 0;
    padding: 45px 12px 12px;
}

.artistprofile-photo-tools {
    top: 8px;
    right: 8px;
    left: 8px;
    justify-content: center;
    gap: 4px;
}

.artistprofile-photo-preview {
    position: relative;
    width: 120px;
    margin: 0 auto;
}

.artistprofile-existing-photo img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.artistprofile-primary-badge {
    display: block;
    margin-top: 6px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

.artistprofile-primary-badge .icon,
.artistprofile-help .icon {
    margin-right: 4px;
}

.artistprofile-help {
    margin: 0 0 10px;
}

.artistprofile-upload-block {
    margin-top: 12px;
}

.artistprofile-sortable-list:empty {
    margin-bottom: 0;
}

.artistprofile-primary-badge[hidden] {
    display: none !important;
}

.artistprofile-new-photo-name {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    font-size: .88em;
    line-height: 1.3;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artistprofile-upload-block input[type="file"] {
    max-width: 100%;
}

/* Revision and moderation previews */
.artistprofile-preview-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.artistprofile-preview-box {
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 5px;
}

.artistprofile-preview-people {
    font-family: Scada, Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.artistprofile-preview-links {
    display: flex;
    flex-wrap: wrap;
    margin-top: 12px;
}

.artistprofile-preview-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.artistprofile-preview-photos figure {
    margin: 0;
}

.artistprofile-preview-photos img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.artistprofile-revision-card {
    display: grid;
    grid-template-columns: var(--artistprofile-profile-size, 150px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 5px;
}

.artistprofile-revision-card-no-photo {
    grid-template-columns: minmax(0, 1fr);
}

.artistprofile-revision-photo {
    position: relative;
}

.artistprofile-revision-photo img {
    display: block;
    width: var(--artistprofile-profile-size, 150px);
    height: var(--artistprofile-profile-size, 150px);
    object-fit: cover;
    border-radius: 5px;
}

.artistprofile-revision-details {
    min-width: 0;
}

.artistprofile-status-pending,
.artistprofile-status-approved {
    font-weight: 600;
}

.artistprofile-status-rejected {
    opacity: .8;
}

@media (max-width: 900px) {
    .artistprofile-link-line {
        grid-template-columns: minmax(130px, 190px) minmax(220px, 1fr);
    }

    .artistprofile-link-label {
        grid-column: 1 / -1;
        max-width: 320px;
    }
}

@media (max-width: 700px) {
    .artistprofile-viewforum-layout,
    .artistprofile-revision-card {
        grid-template-columns: minmax(100px, var(--artistprofile-profile-size, 150px)) minmax(0, 1fr);
        column-gap: 12px;
    }

    .artistprofile-preview-columns,
    .artistprofile-form-grid,
    .artistprofile-person-mainline,
    .artistprofile-link-line {
        grid-template-columns: 1fr;
    }

    .artistprofile-form-grid .full,
    .artistprofile-link-label {
        grid-column: auto;
    }

    .artistprofile-person-mainline,
    .artistprofile-russian-name {
        max-width: none;
    }

    .artistprofile-country-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
    }

    .artistprofile-country-fields {
        width: 100%;
    }

    .artistprofile-country-item {
        grid-template-columns: 24px minmax(115px, 165px) auto;
        width: auto;
    }

    .artistprofile-form-row:not(.artistprofile-existing-photo) {
        padding-right: 12px;
        padding-top: 48px;
    }

    .artistprofile-form-row:not(.artistprofile-existing-photo) > .artistprofile-row-tools {
        left: 10px;
        right: auto;
    }
}

/* Moderation navigation and MCP dashboard */
.artistprofile-review-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.artistprofile-review-navigation-bottom {
    margin: 12px 0 0;
}

.artistprofile-review-navigation .button2 {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.artistprofile-review-navigation-placeholder {
    min-width: 1px;
}

.artistprofile-mcp-recent .artistprofile-status-pending,
.artistprofile-mcp-recent .artistprofile-status-approved,
.artistprofile-mcp-recent .artistprofile-status-rejected {
    white-space: nowrap;
}


.artistprofile-reset-history {
    margin-top: 14px;
}

.artistprofile-reset-history p {
    margin: 6px 0 10px;
}

.artistprofile-reset-history form {
    margin: 0;
}
