.abcreview-summary {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.abcreview-average {
    text-align: center;
    border: 1px solid var(--bs-border-color, #ddd);
    border-radius: 14px;
    padding: 1rem;
    background: var(--bs-body-bg, #fff);
}

.abcreview-average-number {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
}

.abcreview-stars {
    letter-spacing: .1rem;
    color: #f5a623;
}

.abcreview-distribution-row {
    display: grid;
    grid-template-columns: 52px 1fr 42px;
    gap: .5rem;
    align-items: center;
    margin-bottom: .35rem;
}

.abcreview-bar {
    height: .7rem;
    border-radius: 1rem;
    background: var(--bs-secondary-bg, #eee);
    overflow: hidden;
}

.abcreview-bar span {
    display: block;
    height: 100%;
    background: #f5a623;
}

.abcreview-toolbar {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.abcreview-card {
    border: 1px solid var(--bs-border-color, #ddd);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bs-body-bg, #fff);
}

.abcreview-card-layout {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.abcreview-image-column {
    flex: 0 0 160px;
    max-width: 160px;
}

.abcreview-review-image {
    display: block;
    width: 160px;
    height: 160px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--bs-border-color, #ddd);
    background: var(--bs-tertiary-bg, #f6f8fa);
}

.abcreview-review-body {
    flex: 1 1 auto;
    min-width: 0;
}

.abcreview-meta {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
    color: var(--bs-secondary-color, #777);
    font-size: .92rem;
}

.abcreview-title {
    font-weight: 700;
    margin: .4rem 0;
}

.abcreview-content {
    white-space: pre-wrap;
    margin: .6rem 0;
}

.abcreview-response {
    margin-top: .75rem;
    border-left: 4px solid var(--bs-primary, #0d6efd);
    padding: .6rem .75rem;
    background: var(--bs-tertiary-bg, #f6f8fa);
    border-radius: 0 10px 10px 0;
}

.abcreview-votes {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .75rem;
}

.abcreview-vote.active {
    font-weight: 700;
}

.abcreview-source-badge {
    text-transform: uppercase;
    letter-spacing: .03em;
}

.abcreview-manage-table td {
    vertical-align: top;
}

.abcreview-manage-review-cell {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}


.abcreview-admin-image-cell {
    width: 260px;
    min-width: 220px;
}

.abcreview-admin-image-cell .abcreview-manage-image {
    display: block;
    margin-bottom: .5rem;
}

.abcreview-manage-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--bs-border-color, #ddd);
    background: var(--bs-tertiary-bg, #f6f8fa);
    flex: 0 0 72px;
}

.abcreview-import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.abcreview-small-help {
    font-size: .9rem;
    color: var(--bs-secondary-color, #777);
}

@media (max-width: 680px) {
    .abcreview-summary {
        grid-template-columns: 1fr;
    }

    .abcreview-toolbar {
        display: block;
    }

    .abcreview-toolbar > * {
        margin-bottom: .5rem;
        width: 100%;
    }

    .abcreview-card-layout {
        display: block;
    }

    .abcreview-image-column {
        max-width: 300px;
        margin: 0 auto 1rem;
    }

    .abcreview-review-image {
        width: 300px;
        height: 300px;
        max-width: 100%;
    }

    .abcreview-manage-review-cell {
        display: block;
    }

    
.abcreview-admin-image-cell {
    width: 260px;
    min-width: 220px;
}

.abcreview-admin-image-cell .abcreview-manage-image {
    display: block;
    margin-bottom: .5rem;
}

.abcreview-manage-image {
        margin-bottom: .5rem;
    }
}

.abcreview-image-diagnostic {
    margin-top: .35rem;
    word-break: break-word;
}

.abcreview-image-actions,
.abcreview-admin-image-actions {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px dashed var(--bs-border-color, #ddd);
}

.abcreview-inline-image-form {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}

.abcreview-inline-image-form .form-control {
    max-width: 280px;
}

.abcreview-existing-review-image-editor {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

@media (max-width: 680px) {
    .abcreview-inline-image-form {
        display: block;
    }

    .abcreview-inline-image-form .form-control,
    .abcreview-inline-image-form .btn {
        width: 100%;
        max-width: 100%;
        margin-top: .5rem;
    }
}

.abcreview-author-actions {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: .75rem;
}

.abcreview-author-actions .abcreview-image-actions {
    flex-basis: 100%;
}

.abcreview-own-review-status {
    background: var(--bs-tertiary-bg, #f6f8fa);
}

.abcreview-open-edit-form {
    margin: .25rem 0;
}

.abcreview-open-edit-form .input-group {
    min-width: 170px;
}

.abcreview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .35rem 0 .5rem;
}

.abcreview-tag-badge {
    display: inline-block;
    padding: .18rem .5rem;
    border-radius: 999px;
    border: 1px solid #0d6efd;
    color: #fff !important;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
}

.abcreview-tag-admin-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.abcreview-tag-admin-grid .form-control:not(.form-control-color) {
    max-width: 360px;
}

.abcreview-tag-admin-grid .form-control-color {
    width: 52px;
    min-width: 52px;
    padding: .15rem;
}

.abcreview-admin-tags-cell {
    min-width: 220px;
}

.abcreview-assign-tags-form label {
    font-weight: 400;
    margin-bottom: .25rem;
}

@media (max-width: 680px) {
    .abcreview-tag-admin-grid {
        display: block;
    }

    .abcreview-tag-admin-grid .form-control,
    .abcreview-tag-admin-grid .btn {
        width: 100%;
        max-width: 100%;
        margin-top: .5rem;
    }
}

/* Review moderation card/grid layout */
.abcreview-manage-card-list {
    display: grid;
    gap: 1rem;
}

.abcreview-manage-card-grid {
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(320px, 1fr) minmax(220px, 280px);
    gap: 1rem;
    align-items: start;
    border: 1px solid var(--bs-border-color, #ddd);
    border-radius: 14px;
    background: var(--bs-body-bg, #fff);
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.abcreview-manage-left,
.abcreview-manage-main,
.abcreview-manage-right {
    min-width: 0;
}

.abcreview-manage-left,
.abcreview-manage-right {
    display: grid;
    gap: .85rem;
}

.abcreview-manage-rating-box,
.abcreview-admin-image-block,
.abcreview-admin-tags-block,
.abcreview-source-block,
.abcreview-action-block {
    border: 1px solid var(--bs-border-color, #ddd);
    border-radius: 12px;
    padding: .75rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.abcreview-manage-rating-box .abcreview-stars {
    font-size: 1.15rem;
    line-height: 1.2;
}

.abcreview-manage-date {
    margin: .25rem 0 .5rem;
    color: var(--bs-secondary-color, #777);
    font-size: .9rem;
}

.abcreview-status-pill {
    display: inline-block;
    padding: .18rem .5rem;
    border-radius: 999px;
    background: var(--bs-secondary-bg, #e9ecef);
    color: var(--bs-body-color, #333);
    font-size: .82rem;
    font-weight: 700;
}

.abcreview-status-approved {
    background: #d1e7dd;
    color: #0f5132;
}

.abcreview-status-pending {
    background: #fff3cd;
    color: #664d03;
}

.abcreview-status-hidden,
.abcreview-status-rejected {
    background: #f8d7da;
    color: #842029;
}

.abcreview-admin-image-block .abcreview-manage-image {
    width: 96px;
    height: 96px;
    max-width: 100%;
    margin-bottom: .5rem;
}

.abcreview-manage-section-title {
    margin: 0 0 .5rem;
    font-size: .92rem;
    font-weight: 700;
    color: var(--bs-secondary-color, #666);
    text-transform: uppercase;
    letter-spacing: .02em;
}

.abcreview-admin-tags-block .abcreview-tags {
    margin-top: 0;
}

.abcreview-tag-checkboxes {
    max-height: 220px;
    overflow: auto;
    padding: .25rem 0;
}

.abcreview-manage-author {
    color: var(--bs-secondary-color, #777);
    font-weight: 700;
    margin-bottom: .25rem;
}

.abcreview-manage-title {
    margin: 0 0 .6rem;
    font-size: 1.15rem;
    line-height: 1.35;
    font-weight: 700;
}

.abcreview-manage-content {
    line-height: 1.55;
    word-break: break-word;
}

.abcreview-response-form {
    border-top: 1px dashed var(--bs-border-color, #ddd);
    padding-top: .75rem;
}

.abcreview-source-block {
    word-break: break-word;
}

.abcreview-action-buttons {
    display: grid;
    gap: .4rem;
}

.abcreview-action-buttons .btn,
.abcreview-action-block .abcreview-delete-button {
    width: 100%;
    text-align: center;
    margin-top: .4rem;
}

.abcreview-action-buttons .btn:first-child {
    margin-top: 0;
}

.abcreview-open-edit-form {
    margin-top: .75rem;
}

.abcreview-inline-button {
    margin-top: .35rem;
    white-space: normal;
    text-align: left;
}

@media (max-width: 1100px) {
    .abcreview-manage-card-grid {
        grid-template-columns: minmax(220px, 280px) 1fr;
    }

    .abcreview-manage-right {
        grid-column: 1 / -1;
        grid-template-columns: minmax(240px, 1fr) minmax(220px, 280px);
    }
}

@media (max-width: 760px) {
    .abcreview-manage-card-grid,
    .abcreview-manage-right {
        grid-template-columns: 1fr;
    }

    .abcreview-manage-right {
        grid-column: auto;
    }

    .abcreview-admin-image-block .abcreview-manage-image {
        width: 120px;
        height: 120px;
    }
}

/* 26.05.11.8: moderation layout must respond to the real content width, not only the viewport width. */
.abcreview-import-form {
    display: grid;
    gap: .75rem;
}

.abcreview-import-field .control-label,
.abcreview-import-field .form-label {
    display: block;
    margin-bottom: .25rem;
    font-weight: 700;
}

.abcreview-import-field .abcreview-small-help {
    margin-top: .25rem;
}

.abcreview-manage-card-list {
    container-type: inline-size;
}

.abcreview-manage-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    overflow: hidden;
}

.abcreview-manage-left {
    flex: 0 0 250px;
    max-width: 280px;
}

.abcreview-manage-main {
    flex: 1 1 340px;
    min-width: 0;
}

.abcreview-manage-right {
    flex: 0 1 250px;
    max-width: 290px;
}

.abcreview-manage-left,
.abcreview-manage-right {
    align-self: flex-start;
}

.abcreview-manage-content,
.abcreview-source-block,
.abcreview-action-block,
.abcreview-admin-tags-block,
.abcreview-image-diagnostic {
    overflow-wrap: anywhere;
    word-break: normal;
}

@container (max-width: 860px) {
    .abcreview-manage-left {
        flex: 0 0 240px;
        max-width: 260px;
    }

    .abcreview-manage-main {
        flex: 1 1 360px;
    }

    .abcreview-manage-right {
        flex: 1 1 100%;
        max-width: none;
        display: grid;
        grid-template-columns: minmax(240px, 1fr) minmax(220px, 280px);
        gap: .85rem;
    }
}

@container (max-width: 620px) {
    .abcreview-manage-left,
    .abcreview-manage-main,
    .abcreview-manage-right {
        flex: 1 1 100%;
        max-width: none;
    }

    .abcreview-manage-right {
        grid-template-columns: 1fr;
    }
}
