/* Insight article: one premium layout shared by the feed drawer and the insight page.
   Identity: blue #2563eb, Inter, slate neutrals, 16px radius. */

.ia { font-family: 'Inter', sans-serif; color: #0f172a; }

/* ── Drawer shell (feed) ── */
.insight-drawer .drawer-header {
    height: 60px !important;
    padding: 0 12px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid #f1f5f9;
}
.insight-drawer .drawer-header-title { font-size: 16px !important; font-weight: 600 !important; color: #0f172a !important; line-height: 1.3 !important; }
.insight-drawer .drawer-close-btn,
.insight-drawer .drawer-share-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: #475569 !important;
}
.insight-drawer .drawer-close-btn:hover,
.insight-drawer .drawer-share-btn:hover { background: #f1f5f9 !important; }
.insight-drawer .drawer-content-body {
    background: #ffffff !important;
    padding: 60px 0 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: block !important;
}
.insight-drawer .drawer-loader { color: #64748b !important; }
.insight-drawer .drawer-loader i { color: #2563eb !important; }

.ia--drawer { padding: 16px 20px 0; display: flex; flex-direction: column; gap: 16px; }

/* ── Header block ── */
.ia-chip {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-size: 12.5px;
    font-weight: 600;
}
.ia-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2563eb; }
.ia-title { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; color: #0f172a; }

.ia-author { display: flex; align-items: center; gap: 12px; }
.ia-author-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.ia-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #bfdbfe;
}
.ia-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ia-author-name { display: flex; align-items: center; gap: 5px; font-size: 15px; font-weight: 700; color: #0f172a; min-width: 0; }
.ia-author-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ia-author-name .fa-circle-check { color: #2563eb; font-size: 13px; flex-shrink: 0; }
.ia-author-sub { font-size: 13px; color: #64748b; margin-top: 1px; }
.ia-author-sub bdi { unicode-bidi: isolate; }

/* Follow button (keeps id btnMyDoctorFeed + .active state) */
.ia-follow {
    height: 38px;
    padding: 0 16px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid #2563eb !important;
    background: #ffffff !important;
    color: #2563eb !important;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 0.15s, color 0.15s;
}
.ia-follow:hover { background: #eff6ff !important; }
.ia-follow.active { background: #eff6ff !important; color: #1d4ed8 !important; border-color: #bfdbfe !important; }
.ia-follow i { font-size: 12px; }

/* ── Media ── */
.ia-media {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    aspect-ratio: 16 / 10;
}
.ia-media video, .ia-media img { width: 100%; height: 100%; object-fit: contain; display: block; background: #0f172a; }
.ia-media-badge {
    position: absolute;
    bottom: 12px;
    inset-inline-end: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 8px;
    pointer-events: none;
}

/* ── Actions row ── */
.ia-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ia-act {
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #334155 !important;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ia-act:hover { background: #f8fafc !important; border-color: #cbd5e1 !important; }
.ia-act.liked, .ia-act.saved, .ia-act.active {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #1d4ed8 !important;
}
.ia-act.liked i, .ia-act.saved i, .ia-act.active i { color: #2563eb; }
.ia-act--icon { width: 40px; padding: 0; justify-content: center; }
.ia-views { margin-inline-start: auto; font-size: 12.5px; color: #64748b; }

/* ── Body text ── */
.ia-text { font-size: 16.5px; line-height: 1.7; color: #334155; overflow-wrap: anywhere; }
.ia-text p { margin: 0 0 12px; }
.ia-text img, .ia-text video { max-width: 100%; border-radius: 12px; }

/* ── Booking card ── */
.ia-book {
    border: 1px solid #dbeafe;
    background: #f5f9ff;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ia-book-row { display: flex; gap: 12px; align-items: center; }
.ia-book-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ia-book-kicker { font-size: 12px; font-weight: 600; color: #1d4ed8; }
.ia-book-time { font-size: 15px; font-weight: 700; color: #0f172a; text-transform: capitalize; }
.ia-book-sub { font-size: 13px; color: #64748b; }
.ia-book-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ia-btn {
    height: 46px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}
.ia-btn:hover { background: #f8fafc; color: #0f172a; }
.ia-btn--primary { background: #2563eb; border-color: #2563eb; color: #ffffff; }
.ia-btn--primary:hover { background: #1d4ed8; color: #ffffff; }
.ia-btn .fa-whatsapp { color: #16a34a; font-size: 17px; }

/* ── Comments ── */
.ia-comments { display: flex; flex-direction: column; gap: 16px; }
.ia-comments-title { margin: 0; font-size: 17px; font-weight: 700; color: #0f172a; }
.ia-cmt { display: flex; gap: 12px; }
.ia-cmt-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ia-cmt-av img { width: 100%; height: 100%; object-fit: cover; }
.ia-cmt-av.is-author { background: #2563eb; color: #ffffff; }
.ia-cmt-body { flex: 1; min-width: 0; }
.ia-cmt-meta { font-size: 13.5px; color: #64748b; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ia-cmt-meta strong { color: #0f172a; font-weight: 600; }
.ia-cmt-badge { font-size: 11px; font-weight: 600; color: #1d4ed8; background: #eff6ff; padding: 2px 8px; border-radius: 999px; }
.ia-bubble {
    margin-top: 4px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 4px 14px 14px 14px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #334155;
    overflow-wrap: anywhere;
}
[dir="rtl"] .ia-bubble { border-radius: 14px 4px 14px 14px; }
.ia-cmt.is-author .ia-bubble { background: #f5f9ff; border-color: #dbeafe; }
.ia-empty { text-align: center; padding: 28px 16px; color: #64748b; font-size: 14px; }
.ia-empty i { display: block; font-size: 26px; color: #bfdbfe; margin-bottom: 10px; }
.ia-more {
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #f8fafc;
    color: #2563eb;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    width: 100%;
}
.ia-more:hover { background: #eff6ff; }
.ia-more i { font-size: 11px; transition: transform 0.2s; }

/* Comment input */
.ia-compose { display: flex; align-items: center; gap: 10px; }
.ia-compose input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0 16px;
    font-family: inherit;
    font-size: 14.5px;
    color: #0f172a;
    outline: none;
}
.ia-compose input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); background: #ffffff; }
.ia-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}
.ia-send:hover { background: #1d4ed8; }
[dir="rtl"] .ia-send i { transform: scaleX(-1); }
.ia-compose--sticky {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin: 8px -20px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

/* ── Insight page (desktop two columns, phone single column) ── */
.ia-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}
.ia-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    margin-bottom: 14px;
}
.ia-back:hover { color: #2563eb; }
[dir="rtl"] .ia-back i { transform: scaleX(-1); }
.ia-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.ia-card + .ia-card { margin-top: 18px; }
.ia-page .ia-title { font-size: 32px; line-height: 1.25; letter-spacing: -0.02em; }
.ia-page .ia-text { font-size: 17px; line-height: 1.75; max-width: 720px; }
.ia-page .ia-avatar { width: 48px; height: 48px; font-size: 15px; }
.ia-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 90px; }
.ia-side .ia-book { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08); border-radius: 20px; padding: 20px; }
.ia-side .ia-book-btns { grid-template-columns: 1fr; }
.ia-related { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ia-related h2 { margin: 0; font-size: 15px; font-weight: 700; }
.ia-rel { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: #0f172a; }
.ia-rel:hover .ia-rel-title { color: #2563eb; }
.ia-rel-thumb { width: 96px; height: 64px; border-radius: 10px; overflow: hidden; background: #1e293b; flex-shrink: 0; }
.ia-rel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ia-rel-title { font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ia-rel-sub { font-size: 12.5px; color: #64748b; margin-top: 2px; }

.ia-mobile-only { display: none; }

@media (max-width: 960px) {
    .ia-page { grid-template-columns: 1fr; padding: 16px 16px 96px; gap: 18px; }
    .ia-side { position: static; }
    .ia-side .ia-book { display: none; }
    .ia-mobile-only { display: flex; }
    .ia-card { padding: 20px; border-radius: 16px; }
    .ia-page .ia-title { font-size: 24px; }
    .ia-page .ia-text { font-size: 16.5px; }
    .ia-page-compose {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        margin: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: #ffffff;
        border-top: 1px solid #f1f5f9;
    }
}
@media (min-width: 961px) {
    .ia-page-compose--mobile { display: none !important; }
}

@media (max-width: 640px) {
    .ia-title { font-size: 22px; }
}

@media (max-width: 960px) {
    .ia-page-compose--desktop { display: none !important; }
}
