﻿.entity-photo-editor-card {
    margin-top: 1.35rem;
    padding: 1.4rem;
    border: 1px solid rgba(210, 220, 247, 0.9);
    border-radius: 1.35rem;
    background: #ffffff;
    box-shadow: 0 0.45rem 1.4rem rgba(34, 57, 108, 0.045);
}

.entity-photo-editor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.05rem;
}

    .entity-photo-editor-header h2 {
        margin: 0;
        color: #101c40;
        font-family: "Montserrat", "Inter", sans-serif;
        font-size: 1.12rem;
        font-weight: 700;
    }

    .entity-photo-editor-header p {
        margin: 0.35rem 0 0;
        color: #67728b;
        font-size: 0.91rem;
    }

.entity-photo-count-pill {
    flex-shrink: 0;
    padding: 0.48rem 0.82rem;
    border: 1px solid #d7def4;
    border-radius: 999px;
    background: #f3f6ff;
    color: #40517d;
    font-size: 0.86rem;
    font-weight: 700;
}

.entity-photo-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.05rem;
    padding: 0.88rem 0.95rem;
    border-radius: 1rem;
    background: #f7f9ff;
}

.entity-photo-limit-copy {
    color: #66728c;
    font-size: 0.88rem;
}

.entity-photo-add-button {
    white-space: nowrap;
}

.entity-photo-feedback {
    margin-bottom: 1rem;
    padding: 0.74rem 0.88rem;
    border-radius: 0.82rem;
    font-size: 0.91rem;
    font-weight: 500;
}

    .entity-photo-feedback.is-success {
        border: 1px solid #bfe4cb;
        background: #effaf3;
        color: #176338;
    }

    .entity-photo-feedback.is-error {
        border: 1px solid #f0c3ca;
        background: #fff3f5;
        color: #a1293d;
    }

.entity-photo-loading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 4.5rem;
    color: #64718b;
    font-size: 0.92rem;
}

    .entity-photo-loading[hidden] {
        display: none;
    }

.entity-photo-spinner {
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid #d9e1fa;
    border-top-color: #4567f2;
    border-radius: 50%;
    animation: entity-photo-spin 0.78s linear infinite;
}

@keyframes entity-photo-spin {
    to {
        transform: rotate(360deg);
    }
}

.entity-photo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    min-height: 9rem;
    margin-top: 0.35rem;
    border: 1px dashed #d9e0f3;
    border-radius: 1rem;
    background: #fbfcff;
    color: #66728c;
    text-align: center;
}

    .entity-photo-empty[hidden] {
        display: none;
    }

.entity-photo-empty-icon {
    width: 2.65rem;
    height: 2.65rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #eef2ff;
    color: #526feb;
    font-size: 1.25rem;
}

.entity-photo-empty strong {
    margin-top: 0.15rem;
    color: #17264b;
    font-size: 0.96rem;
}

.entity-photo-empty p {
    margin: 0;
    color: #71809a;
    font-size: 0.87rem;
}

.entity-photo-thumbnail-strip {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    overflow-x: auto;
    padding: 0.25rem 0.05rem 0.55rem;
    scrollbar-width: thin;
}

    .entity-photo-thumbnail-strip[hidden] {
        display: none;
    }

.entity-photo-tile {
    flex: 0 0 8.65rem;
    width: 8.65rem;
}

.entity-photo-preview {
    position: relative;
    display: block;
    width: 8.65rem;
    height: 8.65rem;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d7def3;
    border-radius: 1rem;
    background: #f3f5fb;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

    .entity-photo-preview:hover {
        border-color: #a9baf3;
        box-shadow: 0 0.35rem 0.9rem rgba(54, 81, 162, 0.12);
        transform: translateY(-1px);
    }

    .entity-photo-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.entity-photo-order-badge,
.entity-photo-cover-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 700;
    line-height: 1;
}

.entity-photo-order-badge {
    left: 0.42rem;
    bottom: 0.42rem;
    padding: 0.32rem 0.45rem;
    background: rgba(255, 255, 255, 0.93);
    color: #23365f;
}

.entity-photo-cover-badge {
    top: 0.42rem;
    left: 0.42rem;
    padding: 0.34rem 0.48rem;
    background: #4265f3;
    color: #ffffff;
}

.entity-photo-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.36rem;
    margin-top: 0.5rem;
}

.entity-photo-action {
    min-height: 2rem;
    border: 1px solid #dae1f5;
    border-radius: 0.55rem;
    background: #ffffff;
    color: #53627d;
    font-size: 0.72rem;
    font-weight: 600;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

    .entity-photo-action:hover:not(:disabled) {
        border-color: #aebcf1;
        background: #f3f6ff;
        color: #2f4cbd;
    }

    .entity-photo-action:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.entity-photo-cover-action {
    color: #3458dc;
}

.entity-photo-delete-action {
    color: #ce5064;
}

    .entity-photo-delete-action:hover:not(:disabled) {
        border-color: #efc7cf;
        background: #fff4f6;
        color: #bd334b;
    }

.entity-photo-help {
    margin: 0.85rem 0 0;
    color: #71809a;
    font-size: 0.81rem;
}

.entity-photo-editor-card.is-photo-busy .entity-photo-preview,
.entity-photo-editor-card.is-photo-busy .entity-photo-action {
    pointer-events: none;
}

@media (max-width: 640px) {
    .entity-photo-editor-card {
        padding: 1.05rem;
    }

    .entity-photo-editor-header,
    .entity-photo-editor-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .entity-photo-add-button {
        width: 100%;
    }

    .entity-photo-tile,
    .entity-photo-preview {
        width: 7.8rem;
        flex-basis: 7.8rem;
    }

    .entity-photo-preview {
        height: 7.8rem;
    }
}