/* ============================================================
   project-list.css  —  Styles for Project/List
   PDPortal / PublicDial Services
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background: #f0f2f8; color: #333; }

/* ?? SHELL ???????????????????????????????????????????????? */
.pl_shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 52px);
    overflow: hidden;
}

/* ?? TOOLBAR ??????????????????????????????????????????????? */
.pl_toolbar {
    background: #fff;
    border-bottom: 1px solid #e0e3f0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.pl_title {
 font-size: 15px;
    font-weight: 800;
    color: #1a237e;
  font-family: 'Sen', sans-serif;
    margin-right: 6px;
}

.pl_count_badge {
    background: #e8eaf6;
    color: #1a237e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    margin-right: 10px;
}

/* Search */
.pl_search_wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
    max-width: 340px;
}
.pl_search_wrap i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
  color: #aaa;
    font-size: 13px;
    pointer-events: none;
}
.pl_search {
    width: 100%;
    padding: 7px 12px 7px 34px;
    border: 1.5px solid #d0d4e8;
    border-radius: 7px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    color: #333;
    background: #f9f9fc;
    transition: border-color .2s, box-shadow .2s;
}
.pl_search:focus {
    outline: none;
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26,35,126,.10);
    background: #fff;
}

/* Category filter pills */
.pl_cat_btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pl_cat_btn {
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1.5px solid #d0d4e8;
    background: #f9f9fc;
    color: #666;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}
.pl_cat_btn:hover  { border-color: #1a237e; color: #1a237e; background: #e8eaf6; }
.pl_cat_btn.active { background: #1a237e; color: #fff; border-color: #1a237e; }

/* View toggle */
.pl_spacer    { flex: 1; }
.pl_view_btns { display: flex; gap: 4px; }
.pl_view_btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid #d0d4e8;
    border-radius: 6px;
    background: #f9f9fc;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all .18s;
}
.pl_view_btn.active,
.pl_view_btn:hover { background: #1a237e; color: #fff; border-color: #1a237e; }

/* ?? SCROLL AREA ??????????????????????????????????????????? */
.pl_scroll { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* ?? GRID / LIST VISIBILITY ???????????????????????????????? */
.pl_list         { display: none; flex-direction: column, gap: 10px; }
.pl_list.visible { display: flex; }
.pl_grid.hidden  { display: none; }

/* ?? GRID ?????????????????????????????????????????????????? */
.pl_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

/* ????????????????????????????????????????????????????????????
   PROJECT CARD  (grid view)
   CSS custom properties injected per-card via Razor:
     --ac        : project accent colour  (e.g. #ff4500)
     --ac-shadow : accent colour at ~19% opacity (e.g. #ff450030)
   ???????????????????????????????????????????????????????????? */
.pl_card {
    background: #fff;
    border-radius: 14px;
    /* left/right/bottom border: light neutral */
    border: 1.5px solid #e8eaf6;
    /* top accent strip: project colour */
    border-top: 3px solid var(--ac, #e65100);
  overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: default;
transition: box-shadow .24s ease, transform .24s ease;
}
.pl_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px var(--ac-shadow, rgba(26,35,126,.16)),
         0 2px  8px rgba(0,0,0,.05);
}

/* ?? CARD HEADER ??????????????????????????????????????????? */
.pl_card_header {
    padding: 18px 18px 12px;
    display: flex;
    align-items: flex-start;
 gap: 14px;
}

/* ?? PROJECT INDEX NUMBER (top-right corner) ??????????????? */
.pl_card_num {
    position: absolute;
    top: 10px;
 right: 13px;
    font-size: 10px;
  font-weight: 800;
    color: #dde0f0;
    font-family: 'Sen', monospace;
    letter-spacing: .5px;
    line-height: 1;
    user-select: none;
}

/* ????????????????????????????????????????????????????????????
   AVATAR  — the hero of this upgrade
Background gradient + shadow set via inline style in Razor.
   ???????????????????????????????????????????????????????????? */
.pl_card_avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    /* spring easing for the hover pop */
  transition: transform .30s cubic-bezier(.34,1.56,.64,1),
  box-shadow .24s ease;
}

/* Diagonal shine — top-left bright, bottom-right dark  */
.pl_card_avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
    135deg,
    rgba(255,255,255,.30)  0%,
        rgba(255,255,255,.06) 48%,
        rgba(0,0,0,.12)      100%
    );
    border-radius: inherit;
    pointer-events: none;
}

/* Category icon */
.pl_card_avatar > i {
    position: relative;
    z-index: 1;
    font-size: 22px;
    color: rgba(255,255,255,.92);
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.28));
}

/* Hover: spring scale + slight tilt */
.pl_card:hover .pl_card_avatar {
    transform: scale(1.12) rotate(-6deg);
}

/* ?? CARD INFO ????????????????????????????????????????????? */
.pl_card_info { flex: 1; min-width: 0; }
.pl_card_name {
    font-size: 14px;
    font-weight: 800;
    color: #1a237e;
    text-overflow: ellipsis;
    font-family: 'Sen', sans-serif;
    line-height: 1.3;
}

/* Category + page-count chips row */
.pl_card_cat {
  display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 5px;
}

/* Category chip — tinted with project accent */
.pl_cat_chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 10px;
    background: rgba(0,0,0,.045);
    color: var(--ac, #888);
    font-size: 10px;
    font-weight: 700;
    border: 1px solid rgba(0,0,0,.07);
    white-space: nowrap;
}

/* Page-count chip — neutral */
.pl_pages_chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 10px;
    background: #f0f2f8;
    color: #888;
    font-size: 10px;
    font-weight: 600;
  white-space: nowrap;
}

/* ?? DESCRIPTION ??????????????????????????????????????????? */
.pl_card_desc {
    font-size: 12px;
    color: #666;
    line-height: 1.65;
    padding: 0 18px 14px;
    flex: 1;
}

/* ?? TAGS ?????????????????????????????????????????????????? */
.pl_card_tags { padding: 0 18px 12px; display: flex; flex-wrap: wrap; gap: 5px; }

.pl_tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f4f5fc;
    color: #666;
  border: 1px solid rgba(0,0,0,.07);
    transition: background .15s, color .15s, border-color .15s;
}
.pl_card:hover .pl_tag {
    background: rgba(0,0,0,.04);
    border-color: var(--ac-shadow, rgba(0,0,0,.10));
}

/* ?? CARD FOOTER ??????????????????????????????????????????? */
.pl_card_footer {
    padding: 10px 18px 14px;
    border-top: 1px solid #f0f1f8;
    display: flex;
    align-items: center;
  gap: 8px;
}

/* Page name pills */
.pl_page_pills { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }

.pl_page_pill {
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(0,0,0,.04);
    color: #777;
    border: 1px solid rgba(0,0,0,.08);
}

/* ?? ACTION BUTTONS ???????????????????????????????????????? */
.pl_card_actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }

.pl_btn_view,
.pl_btn_edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
  border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all .18s;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* View button: accent text + subtle background */
.pl_btn_view {
    background: #f0f2f8;
color: var(--ac, #1a237e);
    border-color: rgba(0,0,0,.07);
}
.pl_btn_view:hover {
    background: var(--ac, #1a237e);
    color: #fff;
    border-color: transparent;
}

/* Edit button: warm orange */
.pl_btn_edit    { background: #fff3e0; color: #e65100; }
.pl_btn_edit:hover { background: #e65100; color: #fff; }

/* ????????????????????????????????????????????????????????????
   LIST ROW
   ???????????????????????????????????????????????????????????? */
.pl_row {
    background: #fff;
    border: 1.5px solid #e8eaf6;
 /* left accent strip */
    border-left: 4px solid var(--ac, #e65100);
    border-radius: 10px;
  padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow .18s, border-color .18s, transform .18s;
}
.pl_row:hover {
    box-shadow: 0 4px 20px var(--ac-shadow, rgba(26,35,126,.12));
    transform: translateX(3px);
}

/* List row avatar — same treatment as card avatar */
.pl_row_avatar {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: rgba(255,255,255,.90);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: transform .28s cubic-bezier(.34,1.56,.64,1);
}
.pl_row_avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,.28)  0%,
  rgba(255,255,255,.05) 48%,
   rgba(0,0,0,.10)      100%
    );
    border-radius: inherit;
    pointer-events: none;
}
.pl_row_avatar > i {
    position: relative;
    z-index: 1;
    font-size: 17px;
    color: rgba(255,255,255,.90);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.24));
}
.pl_row:hover .pl_row_avatar {
    transform: scale(1.10) rotate(-5deg);
}

.pl_row_info { flex: 1; min-width: 0; }
.pl_row_name { font-size: 13.5px; font-weight: 700; color: #1a237e; }
.pl_row_desc {
    font-size: 11.5px;
    color: #888;
  white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 480px;
}
.pl_row_meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pl_row_cat  {
    font-size: 10.5px;
    color: var(--ac, #888);
    background: rgba(0,0,0,.04);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    border: 1px solid rgba(0,0,0,.07);
}

/* ?? EMPTY STATE ??????????????????????????????????????????? */
.pl_empty  { text-align: center; padding: 60px 20px; color: #bbb; }
.pl_empty i   { font-size: 52px; display: block; margin-bottom: 16px; color: #e0e3f0; }
.pl_empty h3           { font-size: 18px; color: #999; margin-bottom: 8px; }
.pl_empty p      { font-size: 13px; }

/* ?? PAGINATION ???????????????????????????????????????????? */
.pl_pagination {
    display: flex;
    justify-content: center;
    align-items: center;
  gap: 5px;
    padding: 22px 0 8px;
    flex-wrap: wrap;
}

/* Base button — works for both <a> and <button> */
.pl_pg_btn {
    /* layout */
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
  display: inline-flex;
    align-items: center;
    justify-content: center;
    /* appearance */
    background: #fff;
    color: #444;
    border: 1.5px solid #d0d4e8;
    border-radius: 8px;
    /* typography */
    font-size: 13px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
 line-height: 1;
    text-decoration: none;
    /* behaviour */
    cursor: pointer;
    user-select: none;
    transition: background .18s, color .18s, border-color .18s,
    box-shadow .18s, transform .15s;
 /* override browser <button> defaults */
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

/* Hover — only when not active/disabled */
.pl_pg_btn:not(.active):not(.disabled):hover {
    background: #e8eaf6;
    color: #1a237e;
    border-color: #9fa8da;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(26,35,126,.12);
}

/* ?? ACTIVE (current page) ?? highest specificity, stands alone */
.pl_pg_btn.active {
    background: #1a237e !important;
    color: #fff       !important;
    border-color: #1a237e !important;
    box-shadow: 0 4px 14px rgba(26,35,126,.38) !important;
    transform: translateY(-2px);
    cursor: default;
    pointer-events: none;
}

/* Disabled (first/last arrows when on boundary) */
.pl_pg_btn.disabled,
.pl_pg_btn:disabled {
    opacity: .32;
    cursor: not-allowed;
    pointer-events: none;
}

/* Arrow icon sizing */
.pl_pg_btn i { font-size: 12px; pointer-events: none; }
