/* ══════════════════════════════════════════════════════════
   ── Universal Report System Modal & Triggers ──
   سامانه جامع و هوشمند ثبت گزارش در هم‌اینجا
   ══════════════════════════════════════════════════════════ */

.hmj-report-modal .modal-dialog {
    max-width: 520px;
    margin: 1.25rem auto;
}

.hmj-report-sheet {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(540px 220px at 100% 0%, rgba(239, 68, 68, 0.09), transparent 70%),
        linear-gradient(180deg, #fffdfd 0%, #ffffff 40%);
    box-shadow:
        0 24px 64px rgba(15, 23, 42, 0.2),
        0 0 0 1px rgba(239, 68, 68, 0.15);
}

.hmj-report-sheet__head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.95rem;
    align-items: start;
    padding: 1.35rem 1.4rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    position: relative;
}

.hmj-report-sheet__badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.28);
    flex-shrink: 0;
}

.hmj-report-sheet__title {
    margin: 0.1rem 0 0.25rem;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--hmj-text, #1e293b);
}

.hmj-report-sheet__sub {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--hmj-text-secondary, #64748b);
}

.hmj-report-sheet__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--hmj-text-muted, #94a3b8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.hmj-report-sheet__close:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    transform: scale(1.05);
}

.hmj-report-sheet__body {
    padding: 1.15rem 1.4rem 0.65rem;
}

/* ── Target Context Preview ── */
.hmj-report-target {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.95rem;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    margin-bottom: 1.1rem;
}

.hmj-report-target__thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
    background: #fff;
}

.hmj-report-target__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.hmj-report-target__info {
    flex: 1;
    min-width: 0;
}

.hmj-report-target__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.09);
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    margin-bottom: 0.2rem;
}

.hmj-report-target__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hmj-report-target__snippet {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0.2rem 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Fields & Labels ── */
.hmj-report-field {
    margin-bottom: 1rem;
}

.hmj-report-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--hmj-text, #334155);
}

.hmj-report-label i {
    color: #ef4444;
    font-size: 0.85rem;
}

.hmj-report-req {
    color: #ef4444;
    font-weight: 800;
}

.hmj-report-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    font-size: 0.88rem;
    background-color: #fff;
    color: #1e293b;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.hmj-report-select:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    outline: none;
}

.hmj-report-textarea {
    width: 100%;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    padding: 0.65rem 0.85rem;
    font-size: 0.86rem;
    line-height: 1.6;
    color: #1e293b;
    resize: vertical;
    min-height: 85px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.hmj-report-textarea:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    outline: none;
}

.hmj-report-hint {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    color: #64748b;
    margin-top: 0.35rem;
}

/* ── Foot ── */
.hmj-report-sheet__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0.85rem 1.4rem 1.35rem;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.hmj-report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    transition: transform 0.18s, background-color 0.18s, box-shadow 0.18s;
}

.hmj-report-btn--ghost {
    background: #f1f5f9;
    color: #475569;
}

.hmj-report-btn--ghost:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.hmj-report-btn--danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.28);
}

.hmj-report-btn--danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.35);
}

.hmj-report-btn--danger:disabled,
.hmj-report-btn--danger.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.hmj-report-submit__spin {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hmj-spin 0.7s linear infinite;
}

.hmj-report-btn.is-loading .hmj-report-submit__text {
    display: none;
}

.hmj-report-btn.is-loading .hmj-report-submit__spin {
    display: inline-block;
}

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

/* ── Report Trigger Buttons on Elements ── */
.pd-gallery__item {
    position: relative;
}

.pd-gallery__report-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    color: #fff;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.pd-gallery__item:hover .pd-gallery__report-btn,
.pg-grid__item:hover .pd-gallery__report-btn,
.pd-gallery__report-btn:focus-visible {
    opacity: 1;
    transform: scale(1);
}

.pd-gallery__report-btn:hover {
    background: rgba(239, 68, 68, 0.95);
    transform: scale(1.1);
}

/* Lightbox Report Button in Meta Bar */
.pd-lb-meta__report {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 0;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    margin-right: 6px;
    transition: background-color 0.18s, transform 0.18s;
}

.pd-lb-meta__report:hover {
    background: rgba(239, 68, 68, 0.85);
    transform: scale(1.1);
}

/* Product Card Report Button */
.place-product-card {
    position: relative;
}

.place-product-card__report-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
    color: #64748b;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s, transform 0.2s, color 0.2s, background-color 0.2s;
    cursor: pointer;
}

.place-product-card:hover .place-product-card__report-btn {
    opacity: 1;
    transform: scale(1);
}

.place-product-card__report-btn:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}
