/* Taj Alwuqar — وصف العقار المنسّق: المحرر + العرض */

/* ─── Rendered description (public + editor surface) ─── */
.iq-rd {
    color: #1f2328;
    font-size: 1.02rem;
    line-height: 1.95;
    overflow-wrap: anywhere;
    word-break: normal;
}

.iq-rd p {
    margin: 0 0 0.85em;
    white-space: normal;
}

.iq-rd p:last-child,
.iq-rd ul:last-child,
.iq-rd ol:last-child {
    margin-bottom: 0;
}

.iq-rd h3 {
    font-size: 1.22em;
    font-weight: 800;
    color: #121820;
    line-height: 1.5;
    margin: 1.1em 0 0.5em;
}

.iq-rd h4 {
    font-size: 1.06em;
    font-weight: 700;
    color: #121820;
    line-height: 1.55;
    margin: 0.95em 0 0.4em;
}

.iq-rd h3:first-child,
.iq-rd h4:first-child {
    margin-top: 0;
}

.iq-rd ul,
.iq-rd ol {
    margin: 0 0 0.9em;
    padding-inline-start: 1.5em;
}

.iq-rd li {
    display: list-item;
    margin: 0.25em 0;
    padding-inline-start: 0.2em;
}

.iq-rd ul,
.iq-rd ul > li {
    list-style: disc outside !important;
}

.iq-rd ol,
.iq-rd ol > li {
    list-style: decimal outside !important;
}

.iq-rd ul li::marker {
    color: #a17d4a;
}

.iq-rd ol li::marker {
    color: #a17d4a;
    font-weight: 700;
}

.iq-rd strong {
    font-weight: 800;
}

.iq-rd blockquote {
    margin: 0 0 0.9em;
    padding: 0.6em 1em;
    border-inline-start: 3px solid #a17d4a;
    background: #f8f6f1;
    border-radius: 6px;
}

.iq-rd .iq-rd-c-navy { color: #0f2744; }
.iq-rd .iq-rd-c-gold { color: #a17d4a; }
.iq-rd .iq-rd-c-burgundy { color: #8b1e2d; }
.iq-rd .iq-rd-c-green { color: #1f6f4a; }
.iq-rd .iq-rd-s-sm { font-size: 0.88em; }
.iq-rd .iq-rd-s-lg { font-size: 1.16em; }
.iq-rd .iq-rd-s-xl { font-size: 1.34em; line-height: 1.6; }
.iq-rd .iq-rd-a-center { text-align: center; }
.iq-rd .iq-rd-a-right { text-align: right; }
.iq-rd .iq-rd-a-left { text-align: left; }
.iq-rd .iq-rd-a-justify { text-align: justify; }

/* ─── Editor ─── */
.iq-rd-editor {
    position: relative;
    width: 100%;
    border: 1px solid #d6d9de;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: start;
}

.iq-rd-editor:focus-within {
    border-color: #a17d4a;
    box-shadow: 0 0 0 3px rgba(161, 125, 74, 0.18);
}

.iq-rd-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid #e6e8eb;
    background: #f7f8fa;
    border-radius: 12px 12px 0 0;
}

.iq-rd-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding-inline-end: 6px;
    margin-inline-end: 2px;
    border-inline-end: 1px solid #e1e4e8;
}

.iq-rd-group:last-child {
    border-inline-end: 0;
    padding-inline-end: 0;
    margin-inline-end: 0;
}

html:not(#iq-rd-x) .iq-rd-editor .iq-rd-btn {
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-height: 0;
    padding: 0;
    border-radius: 7px !important;
    color: #2b3138;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

html:not(#iq-rd-x) .iq-rd-editor .iq-rd-btn:hover {
    background: #eceef1;
}

html:not(#iq-rd-x) .iq-rd-editor .iq-rd-btn.is-active {
    background: #121820;
    color: #f3e7cf;
}

html:not(#iq-rd-x) .iq-rd-editor .iq-rd-btn:focus-visible,
html:not(#iq-rd-x) .iq-rd-editor .iq-rd-swatch:focus-visible,
html:not(#iq-rd-x) .iq-rd-editor .iq-rd-select:focus-visible {
    outline: 2px solid #a17d4a;
    outline-offset: 1px;
}

html:not(#iq-rd-x) .iq-rd-editor .iq-rd-select {
    box-sizing: border-box;
    height: 32px;
    min-height: 32px;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0 !important;
    padding-inline-start: 10px !important;
    padding-inline-end: 26px !important;
    border: 1px solid #d6d9de !important;
    border-radius: 7px !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 9px center !important;
    background-size: 12px 12px !important;
    -webkit-appearance: none;
    appearance: none;
    color: #1f2328;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 30px;
    cursor: pointer;
    box-shadow: none;
}

html[dir="ltr"]:not(#iq-rd-x) .iq-rd-editor .iq-rd-select,
html:not(#iq-rd-x) .iq-rd-editor[dir="ltr"] .iq-rd-select {
    background-position: right 9px center !important;
}

.iq-rd-colors {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 4px;
}

html:not(#iq-rd-x) .iq-rd-editor .iq-rd-swatch {
    all: unset;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    min-height: 0;
    padding: 0;
    border-radius: 50% !important;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #c9cdd3;
    transition: transform 0.12s ease;
}

html:not(#iq-rd-x) .iq-rd-editor .iq-rd-swatch:hover {
    transform: scale(1.12);
}

html:not(#iq-rd-x) .iq-rd-editor .iq-rd-swatch--default { background: #1f2328; }
html:not(#iq-rd-x) .iq-rd-editor .iq-rd-swatch--navy { background: #0f2744; }
html:not(#iq-rd-x) .iq-rd-editor .iq-rd-swatch--gold { background: #a17d4a; }
html:not(#iq-rd-x) .iq-rd-editor .iq-rd-swatch--burgundy { background: #8b1e2d; }
html:not(#iq-rd-x) .iq-rd-editor .iq-rd-swatch--green { background: #1f6f4a; }

.iq-rd-surface {
    min-height: 180px;
    max-height: 460px;
    overflow-y: auto;
    padding: 14px 16px;
    outline: none;
    background: #ffffff;
    color: #1f2328;
    font-size: 0.98rem;
    cursor: text;
    -webkit-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default;
}

.iq-rd-surface * {
    -webkit-user-select: text !important;
    user-select: text !important;
}

.iq-rd-surface:empty::before {
    content: attr(data-placeholder);
    color: #8a929c;
    pointer-events: none;
}

.iq-rd-footer {
    display: flex;
    justify-content: flex-end;
    padding: 6px 12px;
    border-top: 1px solid #eef0f2;
    background: #fbfbfc;
    border-radius: 0 0 12px 12px;
}

.iq-rd-count {
    font-size: 0.74rem;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

html:not(#iq-rd-x) .iq-rd-editor textarea.iq-rd-source {
    position: absolute !important;
    inset-inline-start: 16px;
    bottom: 8px;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    resize: none !important;
}

/* The editor is a self-contained light "paper" surface; dashboard themes (incl. dark tiers) must not recolor it. */
html:not(#iq-rd-x):not(#iq-rd-y) .iq-rd-editor .iq-rd-surface,
html:not(#iq-rd-x):not(#iq-rd-y) .iq-rd-editor .iq-rd-surface :is(p, li, ul, ol, blockquote) {
    color: #1f2328 !important;
}

html:not(#iq-rd-x):not(#iq-rd-y) .iq-rd-editor .iq-rd-surface :is(h3, h4) {
    color: #121820 !important;
}

html:not(#iq-rd-x):not(#iq-rd-y) .iq-rd-editor .iq-rd-surface strong {
    color: inherit;
}

html:not(#iq-rd-x):not(#iq-rd-y) .iq-rd-editor .iq-rd-surface .iq-rd-c-navy { color: #0f2744 !important; }
html:not(#iq-rd-x):not(#iq-rd-y) .iq-rd-editor .iq-rd-surface .iq-rd-c-gold { color: #a17d4a !important; }
html:not(#iq-rd-x):not(#iq-rd-y) .iq-rd-editor .iq-rd-surface .iq-rd-c-burgundy { color: #8b1e2d !important; }
html:not(#iq-rd-x):not(#iq-rd-y) .iq-rd-editor .iq-rd-surface .iq-rd-c-green { color: #1f6f4a !important; }

html:not(#iq-rd-x):not(#iq-rd-y) .iq-rd-editor .iq-rd-select {
    color: #1f2328 !important;
}

@media (max-width: 560px) {
    .iq-rd-toolbar {
        gap: 4px;
        padding: 6px;
    }

    .iq-rd-group {
        padding-inline-end: 4px;
    }

    html:not(#iq-rd-x) .iq-rd-editor .iq-rd-btn {
        width: 30px;
        height: 30px;
    }
}
