/* Property image manager: scoped styles, one native modal and optional inline editing. */
.property-images-open { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 22px; border: 1px solid #27523d; border-radius: 10px; background: #27523d; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.property-images-open:hover { background: #193f2b; color: #fff; }
.property-image-entry { padding: 12px 0; }
.property-image-entry [data-image-summary] { display: block; margin-top: 9px; font-size: 13px; color: #667469; }
.cm-images-open { overflow: hidden; }
.cm-images { padding: 0; border: 1px solid #e0e5dd; border-radius: 22px; width: min(1000px, calc(100% - 40px)); max-width: none; height: min(900px, calc(100dvh - 48px)); max-height: none; margin: auto; color: #24362c; background: #fff; box-shadow: 0 28px 95px rgb(0 0 0 / 24%); direction: rtl; font-family: Tajawal, Arial, sans-serif; font-size: 15px; overflow: hidden; }
.cm-images::backdrop { background: rgb(19 33 26 / 65%); backdrop-filter: blur(4px); }
.cm-images *, .cm-images *::before, .cm-images *::after { box-sizing: border-box; }
.cm-images [hidden] { display: none !important; }
.cm-images-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.cm-images-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 28px 18px; border-bottom: 1px solid #e8ece5; flex-shrink: 0; }
.cm-images-eyebrow { margin: 0 0 5px; font-size: 12px; color: #7d8c7d; }
.cm-images h2 { margin: 0; font-size: 25px; line-height: 1.5; font-weight: 800; color: #24362c; }
.cm-images h2 span { font-size: 17px; color: #7a877c; font-weight: 500; }
.cm-images h3 { margin: 20px 0 12px; font-size: 17px; color: #344b3b; font-weight: 700; }
.cm-images button { font: inherit; min-height: 44px; border: 1px solid #dbe2d7; border-radius: 9px; padding: 9px 15px; background: #fff; color: #344b3b; cursor: pointer; line-height: 1.5; }
.cm-images button:hover { background: #f0f4ec; border-color: #92aa92; }
.cm-images button:focus-visible, .property-images-open:focus-visible { outline: 3px solid #b5c5a6; outline-offset: 3px; }
.cm-images button:disabled { opacity: .55; cursor: wait; }
.cm-images .cm-images-x { flex-shrink: 0; width: 44px; padding: 0; font-size: 27px; border-color: transparent; background: #f5f7f1; }
.cm-images-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px; scrollbar-gutter: stable; }
.cm-images .cm-images-drop { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; width: 100%; min-height: 162px; border: 2px dashed #bdcdb2; border-radius: 14px; background: #f7f9f3; color: #3b583e; padding: 16px; text-align: center; }
.cm-images-drop > span { font-size: 29px; line-height: 1; }
.cm-images-drop strong { font-size: 17px; }
.cm-images-drop small { font-size: 13px; font-weight: 400; color: #71826c; }
.cm-images .cm-images-drop.is-dragging { background: #e8f1df; border-color: #476b42; }
.cm-images-notice { margin: 12px 0; min-height: 0; color: #356941; font-size: 14px; line-height: 1.7; }
.cm-images-notice:empty { display: none; }
.cm-images-notice.is-error { color: #a33b2e; }
.cm-images-empty { padding: 24px; color: #889381; text-align: center; font-size: 14px; line-height: 1.8; }
.cm-images-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(185px,1fr)); gap: 16px; margin-top: 16px; }
.cm-images-card { min-width: 0; border: 1px solid #e3e8de; border-radius: 13px; overflow: hidden; background: #fff; padding: 0 0 12px; }
.cm-images-picture { height: 145px; display: flex; justify-content: center; align-items: center; background: #f0f3ed; overflow: hidden; }
.cm-images-picture img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cm-images-filename { padding: 0 12px; margin: 12px 0 5px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #445744; }
.cm-images-state { padding: 0 12px; margin: 8px 0; font-size: 13px; line-height: 1.7; color: #74826e; overflow-wrap: anywhere; }
.cm-images-state[data-state=ready], .cm-images-state[data-state=uploaded] { color: #3f7849; }
.cm-images-state[data-state=failed], .cm-images-state[data-state=error] { color: #a33b2e; }
.cm-images-card-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 10px; }
.cm-images-card-actions button { flex: 1 1 auto; padding-inline: 9px; font-size: 13px; }
.cm-images-help { padding: 14px 28px; border-top: 1px solid #e9ede5; background: #fff; flex-shrink: 0; }
.cm-images-help strong { font-size: 14px; color: #3c503c; }
.cm-images-help p { margin: 5px 0 0; color: #73816c; font-size: 13px; line-height: 1.8; }
.cm-images-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; border-top: 1px solid #e4e9df; background: #f8faf5; flex-shrink: 0; }
.cm-images-footer > span { font-size: 13px; color: #75816f; }
.cm-images-footer > div { display: flex; gap: 10px; }
.cm-images .cm-images-primary { color: #fff; border-color: #365b3c; background: #365b3c; font-weight: 700; padding-inline: 24px; }
.cm-images .cm-images-primary:hover { background: #24472c; color: #fff; }
.cm-images-edit-heading { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.cm-images-edit-heading h3 { margin: 0 0 14px; overflow-wrap: anywhere; }
.cm-images-edit-heading span { font-size: 13px; color: #a33b2e; }
.cm-images-stage { position: relative; height: clamp(180px, 40vh, 440px); overflow: hidden; background: #17221c; border-radius: 12px; direction: ltr; }
.cm-images-stage > img { display: block; max-width: 100%; }
.cm-images-loading { position: absolute; inset: 0; z-index: 3; background: #17221c; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 20px; }
.cm-images-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.cm-images-tools span { font-size: 13px; }
.cm-images-tools button[aria-pressed=true] { background: #e9f1e1; color: #31552d; border-color: #829e72; }
.cm-images-spinner { display: inline-block; width: 30px; height: 30px; border: 3px solid #bbc8b2; border-top-color: #4e7550; border-radius: 50%; animation: cm-image-spin .8s linear infinite; }
.cm-images-loading .cm-images-spinner { border-color: #697f6b; border-top-color: #fff; }
@keyframes cm-image-spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
    .cm-images { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
    .cm-images-header { padding: 15px 16px; }
    .cm-images h2 { font-size: 22px; }
    .cm-images-body { padding: 16px; }
    .cm-images-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .cm-images-picture { height: 115px; }
    .cm-images-help { padding: 10px 16px; }
    .cm-images-help p { font-size: 12px; }
    .cm-images-footer { padding: 12px 16px max(12px,env(safe-area-inset-bottom)); gap: 8px; }
    .cm-images-footer > span { width: 100%; }
    .cm-images-footer > div { width: 100%; }
    .cm-images-footer button { flex: 1; padding-inline: 10px; font-size: 14px; }
    .cm-images-stage { height: 28vh; min-height: 150px; }
}
@media (max-height: 560px) {
    .cm-images { height: 100dvh; }
    .cm-images-eyebrow { display: none; }
    .cm-images-header { padding-block: 8px; }
    .cm-images-help { padding-block: 6px; }
    .cm-images-help p { font-size: 12px; line-height: 1.5; }
    .cm-images-footer { padding-block: 8px; }
}
@media (prefers-reduced-motion: reduce) { .cm-images-spinner { animation: none; } }

.cm-images-work { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; color: #315e3a; background: #eef5e7; font-size: 14px; line-height: 1.8; }
.cm-images-work > .cm-images-spinner { display: none; flex-shrink: 0; width: 22px; height: 22px; }
.cm-images-work.is-busy > .cm-images-spinner { display: inline-block; }
.cm-images-current { margin-top: 24px; padding-top: 15px; border-top: 1px solid #e4e9df; }
.cm-images-current > summary { cursor: pointer; font-size: 16px; font-weight: 700; min-height: 44px; padding-block: 8px; color: #546b50; }
.cm-images-current > summary span { font-size: 13px; color: #7a8777; }
