/* ============================================================
   Silate Elnile OS — brand theme
   Palette: dark chocolate (#4e342e) + sand gold (#d9a441) + slate.
   Arabic-first (RTL). NO LinkedIn blue, by design.
   ============================================================ */

:root {
    --nc-teal: #4e342e;
    --nc-teal-dark: #3e2823;
    --nc-teal-deep: #2f1e1a;
    --nc-gold: #d9a441;
    --nc-gold-soft: #f3e5c3;
    --nc-sand: #faf6ee;
    --nc-slate: #1e293b;
    --nc-muted: #64748b;
}

body {
    background-color: var(--nc-sand);
    font-family: "Noto Naskh Arabic", "Amiri", "Segoe UI", Tahoma, serif;
    color: var(--nc-slate);
}

/* --- navbar: deep chocolate (brand bar) --- */
.nc-navbar {
    background: linear-gradient(90deg, var(--nc-teal-deep), var(--nc-teal));
    box-shadow: 0 2px 8px rgba(47, 30, 26, .30);
}
.nc-navbar .navbar-brand {
    color: #fff;
    font-weight: 800;
    letter-spacing: .3px;
}
.nc-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--nc-gold), #b07d1f);
    color: #fff;
    font-weight: 900;
    margin-inline-end: 8px;
}
/* brand logo image (user-provided) */
.nc-logo {
    width: 36px; height: 36px;
    border-radius: 9px;
    object-fit: cover;
    margin-inline-end: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.nc-logo-lg {
    width: 96px; height: 96px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    margin-bottom: 10px;
}
.nc-nav-link {
    color: rgba(255,255,255,.85) !important;
    border-radius: 8px;
    transition: background .15s;
}
.nc-nav-link:hover, .nc-nav-link.active {
    background: rgba(255,255,255,.12);
    color: #fff !important;
}
.nc-search {
    max-width: 340px;
}

/* --- cards --- */
.nc-card {
    background: #fff;
    border: 1px solid #e8e2d5;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(30,41,59,.06);
}

/* --- gold accents --- */
.nc-gold-text { color: var(--nc-gold); }
.nc-vip { color: #b8860b; } /* VIP crown — rich gold */
.nc-badge-gold {
    background: var(--nc-gold-soft);
    color: #7a5a10;
    border: 1px solid #e6cf97;
}

/* --- buttons --- */
.btn-nc {
    background: var(--nc-teal);
    border: 0;
    color: #fff;
    font-weight: 600;
}
.btn-nc:hover { background: var(--nc-teal-dark); color: #fff; }
.btn-nc-gold {
    background: var(--nc-gold);
    border: 0;
    color: #3d2c05;
    font-weight: 700;
}
.btn-nc-gold:hover { background: #c98f2a; color: #241b04; }
.btn-nc-outline {
    border: 1px solid var(--nc-teal);
    color: var(--nc-teal);
    font-weight: 600;
}
.btn-nc-outline:hover { background: var(--nc-teal); color: #fff; }

/* --- avatars --- */
.avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--nc-gold-soft);
}
.avatar-lg { width: 96px; height: 96px; }
.avatar-sm { width: 36px; height: 36px; }

/* --- feed --- */
.nc-post-body { white-space: pre-wrap; word-break: break-word; }
.nc-composer textarea {
    border-radius: 12px;
    resize: none;
}
.nc-muted { color: var(--nc-muted); }

/* --- sticky sidebars --- */
.nc-sticky { position: sticky; top: 76px; }

/* --- jobs --- */
.nc-job-type {
    font-size: .75rem;
    background: #e8f4f7;
    color: var(--nc-teal-dark);
    border-radius: 20px;
    padding: 2px 10px;
}

/* --- chat bubbles --- */
.nc-bubble-mine {
    background: var(--nc-teal);
    color: #fff;
    border-radius: 16px 16px 4px 16px;
}
.nc-bubble-theirs {
    background: #eef1f5;
    color: var(--nc-slate);
    border-radius: 16px 16px 16px 4px;
}

/* --- misc --- */
.cursor-pointer { cursor: pointer; }
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   Mobile viewer + PWA + burger-menu fixes
   ============================================================ */

/* --- burger icon: white bars (visible on brown) --- */
.navbar-toggler {
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 8px;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- mobile collapse: solid brown bg + white text (no black-on-brown) --- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--nc-teal-deep);
        margin: 0 -1rem;
        padding: .6rem 1rem .9rem;
        border-radius: 0 0 14px 14px;
    }
    .nc-navbar .nav-link,
    .nc-navbar .dropdown-toggle,
    .navbar-collapse .nav-link { color: #fff !important; }
    .navbar-collapse .dropdown-menu {
        background: #3a2a24;
        border: 1px solid rgba(255,255,255,.14);
    }
    .navbar-collapse .dropdown-item { color: #fff; }
    .navbar-collapse .dropdown-item:hover,
    .navbar-collapse .dropdown-item.active { background: rgba(255,255,255,.12); color: #fff; }
    .navbar-collapse .dropdown-divider { border-color: rgba(255,255,255,.15); }
    .nc-search { max-width: 100%; margin-inline-start: 0 !important; }
}

/* --- mobile top bar --- */
.nc-mobile-top {
    background: linear-gradient(90deg, var(--nc-teal-deep), var(--nc-teal));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(47,30,26,.30);
    z-index: 1030;
}
.nc-mobile-brand { display: flex; align-items: center; color: #fff; text-decoration: none; }
.nc-mobile-brand .nc-logo { width: 32px; height: 32px; }
.nc-top-icon {
    position: relative;
    color: #fff;
    font-size: 1.15rem;
    padding: 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nc-top-icon:hover { background: rgba(255,255,255,.14); color: #fff; }
.nc-top-badge {
    position: absolute;
    top: 0; inset-inline-end: 0;
    transform: translate(20%, -10%);
    background: #dc2626;
    color: #fff;
    font-size: .6rem;
    min-width: 16px; height: 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* --- mobile bottom navigation --- */
.nc-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #e8e2d5;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    z-index: 1040;
    box-shadow: 0 -2px 10px rgba(30,41,59,.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.nc-bn-item {
    flex: 1;
    padding: 8px 2px 6px;
    color: #64748b;
    font-size: .68rem;
    text-align: center;
    border-radius: 10px;
}
.nc-bn-item i { display: block; font-size: 1.25rem; margin-bottom: 2px; }
.nc-bn-item.active { color: var(--nc-teal); font-weight: 700; }
.nc-bn-link { color: inherit; }
.nc-more-menu { max-height: 70vh; overflow-y: auto; }
.nc-mobile-main { padding-bottom: 84px; }

/* --- install button (desktop FAB) --- */
.nc-install-fab {
    position: fixed;
    bottom: 20px; inset-inline-end: 20px;
    z-index: 1050;
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 0;
    background: var(--nc-gold);
    color: #3d2c05;
    font-size: 1.3rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nc-install-fab:hover { background: #c98f2a; color: #241b04; }

/* ============================================================
   Header spacing — roomier desktop header (AR+EN) — v1.4.6
   Fixes the crowded English header: more gap between items,
   padded nav links, bounded search box, nowrap buttons.
   ============================================================ */
/* nc-header-spacing-v1 */
@media (min-width: 992px) {
    .nc-navbar .navbar-brand { margin-inline-end: 1.1rem; }
    .nc-navbar .nc-nav-link {
        padding: .55rem .8rem;
        border-radius: 10px;
    }
    .nc-navbar .navbar-nav { gap: .35rem; }
    .nc-navbar .nc-search {
        width: 240px;
        margin-inline-start: 1.25rem;
    }
    .nc-navbar .btn { white-space: nowrap; }
    .nc-navbar .btn-nc-gold { font-size: .82rem; padding: .4rem .8rem; }
    .nc-navbar .btn-outline-light { font-size: .82rem; padding: .4rem .7rem; }
    .nc-navbar .dropdown > .nc-nav-link { padding-inline-end: .9rem; }
}
@media (min-width: 1200px) {
    .nc-navbar .nc-search { width: 280px; }
    .nc-navbar .navbar-nav { gap: .5rem; }
    .nc-navbar .nc-nav-link { padding-inline: .9rem; }
}
@media (min-width: 1400px) {
    .nc-navbar .nc-search { width: 320px; }
}


/* ============================================================
   Desktop: ALWAYS exactly 3 columns — v1.4.7
   Stacks any content-page internal columns (pages/groups used to
   show a 2-col row inside the center column, which read as a
   4th column next to "People you may know").
   ============================================================ */
/* nc-3col-v1 */
@media (min-width: 992px) {
    .nc-body-desktop .container { max-width: 1240px; }
    .nc-body-desktop .col-lg-6 > .row > [class*="col-lg-"],
    .nc-body-desktop .col-lg-6 > .row > [class*="col-md-"],
    .nc-body-desktop .col-lg-6 > .row > [class*="col-xl-"] {
        flex: 0 0 100%; max-width: 100%;
    }
    /* keep 2-across form fields (language/instruction etc.) readable:
       allow col-md-6 to stay half-width ONLY when the user is on a wide
       screen — actually force them full-width too for a clean single column */
    .nc-body-desktop .col-lg-6 > .row > .col-md-6 { flex: 0 0 100%; max-width: 100%; }
}

/* ============================================================
   Comment reactions (FB-style) — v1.6.5
   ============================================================ */
.nc-react-btn { font-size: .9rem; line-height: 1; opacity: .72; border-radius: 10px; }
.nc-react-btn:hover { opacity: 1; transform: scale(1.1); }
.nc-react-btn.active { opacity: 1; background: rgba(217, 164, 65, .22); }
.nc-react-count { font-size: .72rem; margin-inline-start: 1px; color: #6b5d4d; }
.nc-emoji { font-size: .95rem; }

/* Profile section visibility select (compact, fits next to a label) */
.nc-vis-select { width: auto; min-width: 130px; font-size: .78rem; }

/* Chat attachments + image download button — v1.6.7 */
.nc-dl-btn { opacity: .9; box-shadow: 0 1px 4px rgba(0,0,0,.25); z-index: 2; }
.nc-dl-btn:hover { opacity: 1; }
.nc-attach { background: rgba(255,255,255,.55); border: 1px dashed rgba(0,0,0,.18); border-radius: 8px; padding: 4px 8px; }
.nc-attach:hover { border-color: #4e342e; }

/* ============================================================
   Desktop chat dock (FB/LinkedIn style) + read ticks — v1.6.9
   ============================================================ */
.nc-dock { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 1080; }
.nc-dock-btn {
    width: 56px; height: 56px; border-radius: 50%; border: none;
    background: #4e342e; color: #fff; font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.3); position: relative;
}
.nc-dock-btn:hover { background: #3e2823; }
.nc-dock-badge {
    position: absolute; top: -4px; inset-inline-end: -4px;
    background: #dc3545; color: #fff; border-radius: 50%;
    min-width: 20px; height: 20px; font-size: .7rem; line-height: 20px;
    padding: 0 4px; text-align: center;
}
.nc-dock-card {
    position: absolute; bottom: 66px; inset-inline-end: 0;
    width: 340px; max-height: 480px; display: flex; flex-direction: column;
    background: #fff; border: 1px solid #e0d8c8; border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.18); overflow: hidden;
}
.nc-dock-head {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; background: #4e342e; color: #fff;
}
.nc-dock-head .btn { color: #fff; }
.nc-dock-head a { color: #f0e8d8; }
.nc-dock-list { overflow-y: auto; max-height: 380px; }
.nc-dock-item {
    display: flex; align-items: center; gap: 8px; width: 100%;
    border: none; background: #fff; padding: 8px 12px; text-align: start;
}
.nc-dock-item:hover { background: #faf6ee; }
.nc-dock-msgs { overflow-y: auto; flex-grow: 1; min-height: 200px; max-height: 320px; padding: 8px; background: #f7f3ea; }
.nc-dock-form { display: flex; gap: 6px; align-items: center; padding: 8px; border-top: 1px solid #eee; }

/* read ticks (WhatsApp-style) */
.nc-tick { font-size: .85rem; color: rgba(255,255,255,.95); line-height: 1; }
.nc-tick .bi { font-size: .95rem; }
.nc-tick-delivered { color: #4da6ff; }
.nc-tick-read { color: #4da6ff; }


/* ============================================================
   Rich-text (RTF) editor — v1.6.13
   ============================================================ */
.nc-rt { border: 1px solid #d8cfc0; border-radius: 10px; overflow: hidden; background: #fff; }
.nc-rt-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 4px 6px; background: #f7f3ea; border-bottom: 1px solid #eee; }
.nc-rt-btn { border: none; background: transparent; border-radius: 6px; min-width: 30px; height: 28px; font-size: .9rem; color: #3e2823; }
.nc-rt-btn:hover { background: #e9e0cc; }
.nc-rt-area { padding: 8px 10px; min-height: 120px; outline: none; overflow-y: auto; }
.nc-rt-area:focus { box-shadow: inset 0 0 0 1px #d9a441; }
.nc-rt-area ul, .nc-rt-area ol { padding-inline-start: 22px; }

/* ============================================================
   Profile structured entries + skill chips (feedback #8) — v1.6.15
   ============================================================ */
.nc-entry { background: #fbf8f1; }
.nc-entry input.form-control-sm, .nc-entry textarea.form-control-sm { font-size: .85rem; }
.nc-skill-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: #f4e3bd; color: #4a3607; border-radius: 14px;
    padding: 2px 8px; margin: 2px 4px 2px 0; font-size: .82rem;
}
.nc-skill-chip .nc-skill-x { border: none; background: transparent; color: #7a5a1e; font-weight: 700; cursor: pointer; line-height: 1; }
.nc-skill-chip .nc-skill-x:hover { color: #b91c1c; }
.nc-eye { border-start-start-radius: 0; border-end-start-radius: 0; }

/* ============ v1.7.3 Phase 10 POLISH: keyboard accessibility ============ */
/* Visible focus ring for keyboard users (never hidden for mouse users). */
:focus-visible { outline: 3px solid #b8860b; outline-offset: 2px; border-radius: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid #b8860b; outline-offset: 2px; border-radius: 4px;
}
/* Slightly larger tap targets for the smallest icon buttons (mobile). */
.btn-xs, .btn-sm { min-height: 28px; }
@media (max-width: 576px) { .btn-sm { min-height: 34px; } }
/* Smoother transitions for interactive states (polish pass). */
a, button { transition: opacity .15s ease, background-color .15s ease, color .15s ease; }

/* ============ v1.7.6: post reaction popup + AJAX comment highlight ============ */
.nc-react-pop { position: relative; display: inline-block; }
.nc-react-trigger { cursor: pointer; }
.nc-react-menu {
    position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 60;
    display: none; background: #fff; border: 1px solid #e2e2e2;
    border-radius: 999px; padding: 5px 8px; box-shadow: 0 8px 24px rgba(0,0,0,.16);
    white-space: nowrap;
}
/* v1.7.7: invisible bridge over the 8px gap so moving fast to the emojis
   never drops the hover (the popup used to vanish mid-move). */
.nc-react-menu::before {
    content: ''; position: absolute; bottom: -10px; left: 0; right: 0; height: 10px;
}
.nc-react-pop:hover .nc-react-menu,
.nc-react-pop.open .nc-react-menu { display: inline-flex; gap: 2px; align-items: center; }
.nc-react-option {
    border: none; background: transparent; font-size: 1.4rem; line-height: 1.1;
    padding: 2px 5px; cursor: pointer; border-radius: 50%;
    transition: transform .12s ease;
}
.nc-react-option:hover { transform: scale(1.4); }
.nc-react-option.active { background: #f6ecd8; }
/* newly added comment (AJAX) — brief highlight */
.nc-comment-row.nc-new { animation: ncCommentIn .6s ease; }
@keyframes ncCommentIn { from { background: #f6ecd8; } to { background: transparent; } }
@media (max-width: 576px) {
    .nc-react-menu { left: auto; right: 0; }
    .nc-react-menu::before { left: auto; right: 0; }
}

/* ============ v1.7.8: fixed footer on desktop (stats/mobile-view always reachable) ============ */
.nc-body-desktop footer {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1020;
    background: #faf7f1; border-top: 1px solid #e4ded2;
    padding: 6px 12px !important; margin-top: 0 !important;
    line-height: 1.4;
}
.nc-body-desktop main { padding-bottom: 58px; }
@media (max-width: 576px) {
    .nc-body-desktop footer { position: static; padding: 14px 12px !important; }
}

