/* ====================================================
   Dubai Real Estate News Feed v4 — Stylesheet
   Server-side · Multi-language · RTL support
   ==================================================== */

/* ── Reset & base ──────────────────────────────────── */
.dren-widget *,
.dren-widget *::before,
.dren-widget *::after {
    box-sizing: border-box;
}

/* ── Outer widget shell ────────────────────────────── */
.dren-widget {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    margin: 0 0 40px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
                 Helvetica, Arial, sans-serif;
    color: #111111;
    width: 100%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.dren-widget--full {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
}

.dren-inner {
    padding: 0;
}

/* ── Header ────────────────────────────────────────── */
.dren-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px 18px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.dren-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* ── LIVE badge ────────────────────────────────────── */
.dren-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff0f0;
    border: 1px solid #ffd0d0;
    color: #e03030;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 6px;
    padding: 4px 9px 4px 7px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

/* Live pulse dot inside badge */
.dren-pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e03030;
    flex-shrink: 0;
    animation: dren-pulse 1.8s ease-in-out infinite;
}

@keyframes dren-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .4; transform: scale(.7); }
}

.dren-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -0.2px;
    color: #111111 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.3 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Headlines badge (top-right) ───────────────────── */
.dren-headlines-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #6b6b6b;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    padding: 6px 14px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.1px;
}

.dren-headlines-badge svg {
    opacity: 0.6;
    flex-shrink: 0;
}

/* ── Headlines area ────────────────────────────────── */
.dren-headlines-wrap {
    padding: 0 28px 4px;
}

/* Source group */
.dren-source-group {
    margin-top: 4px;
}

.dren-source-heading {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #b0b0b0 !important;
    margin: 22px 0 0 !important;
    padding: 0 0 10px !important;
    border-bottom: 1px solid #f2f2f2;
}

.dren-source-group:first-child .dren-source-heading {
    margin-top: 16px !important;
}

.dren-source-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c8c8c8;
    flex-shrink: 0;
}

/* Headlines list */
.dren-headlines {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dren-headlines li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f7f7f7;
    gap: 10px;
}

.dren-headlines li:last-child {
    border-bottom: none;
}

.dren-headlines li::before {
    content: none !important;
}

/* Arrow indicator */
.dren-headlines li::after {
    content: "→";
    font-size: 13px;
    color: #d0d0d0;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.dren-rtl .dren-headlines li::after {
    content: "←";
}

.dren-headlines li:hover::after {
    color: #999;
    transform: translateX(2px);
}

.dren-rtl .dren-headlines li:hover::after {
    transform: translateX(-2px);
}

.dren-headlines a {
    font-size: 14px;
    font-weight: 400;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.55;
    flex: 1;
    transition: color 0.15s ease;
}

.dren-headlines a:hover {
    color: #0055bb;
}

/* ── Error state ───────────────────────────────────── */
.dren-error {
    padding: 24px 0;
}

.dren-error p {
    font-size: 13.5px;
    color: #999999;
    margin: 0;
}

.dren-error a {
    color: #0066cc;
    text-decoration: underline;
}

/* ── Section divider ───────────────────────────────── */
.dren-section {
    padding: 20px 28px;
    border-top: 1px solid #f0f0f0;
}

.dren-section-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #c0c0c0 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
}

/* ── Areas to watch grid ───────────────────────────── */
.dren-section--areas {
    background: #fafafa;
}

.dren-areas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.dren-area-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: border-color .15s, box-shadow .15s;
}

.dren-area-card:hover {
    border-color: #d8d8d8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dren-area-name {
    font-size: 13px;
    font-weight: 600;
    color: #111111;
    line-height: 1.3;
}

.dren-area-desc {
    font-size: 11.5px;
    color: #999999;
    line-height: 1.45;
}

/* ── Footer ────────────────────────────────────────── */
.dren-footer {
    padding: 11px 28px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px;
    color: #c8c8c8;
    text-align: right;
    background: #fafafa;
    letter-spacing: 0.1px;
}

.dren-rtl .dren-footer {
    text-align: left;
}

/* ── RTL overrides ─────────────────────────────────── */
.dren-rtl .dren-header-left {
    flex-direction: row-reverse;
}

.dren-rtl .dren-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.dren-rtl .dren-source-heading {
    flex-direction: row-reverse;
}

/* ── Responsive: tablet ─────────────────────────────── */
@media (max-width: 768px) {
    .dren-header,
    .dren-headlines-wrap,
    .dren-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    .dren-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    .dren-areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dren-title {
        font-size: 14px !important;
    }
}

/* ── Responsive: mobile ─────────────────────────────── */
@media (max-width: 480px) {
    .dren-header,
    .dren-headlines-wrap,
    .dren-section {
        padding-left: 16px;
        padding-right: 16px;
    }
    .dren-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .dren-title {
        font-size: 13px !important;
    }
    .dren-areas-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .dren-headlines a {
        font-size: 13.5px;
    }
    .dren-headlines-badge span:last-child {
        display: none;
    }
}
