/* ==========================================================================
   Job sharing — share button (index.php), share modal, and the
   "Shared Jobs" cards on jobseeker_people.php
   ========================================================================== */

/* ---------------------------------------------------------------- buttons */
/* Heart + share icons stacked in the top-right corner of a job card. */
.job-action-stack {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.job-action-stack .job-favorite-btn,
.job-action-stack .job-share-btn {
    width: 26px;
    height: 26px;
    margin: 0;
    font-size: 12px;
}

.job-share-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #2a86e8 0%, #0b63bb 100%);
    box-shadow: 0 3px 8px -2px rgba(11, 99, 187, .55);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.job-share-btn i {
    transition: transform .18s ease;
}

.job-share-btn:hover {
    transform: translateY(-1px) scale(1.1);
    box-shadow: 0 6px 14px -3px rgba(11, 99, 187, .7);
    background: linear-gradient(135deg, #f9a602 0%, #ea8a00 100%);
}

.job-share-btn:hover i {
    transform: rotate(-12deg) scale(1.08);
}

.job-share-btn:focus-visible {
    outline: 3px solid rgba(11, 99, 187, .35);
    outline-offset: 2px;
}

/* Keep the title / company text clear of the two stacked icons. */
.job-card2 .job-title,
.job-card2 .job-company {
    padding-right: 34px;
}

@media (max-width: 768px) {
    .job-action-stack { gap: 4px; }
    .job-action-stack .job-favorite-btn,
    .job-action-stack .job-share-btn {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
    .job-card2 .job-title,
    .job-card2 .job-company {
        padding-right: 28px;
    }
}

/* ------------------------------------------------------------ share modal */
.jshare-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(6, 30, 46, .55);
    backdrop-filter: blur(3px);
}

.jshare-overlay.is-open {
    display: flex;
    animation: jshare-fade .18s ease;
}

@keyframes jshare-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jshare-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

.jshare-modal {
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 70px -20px rgba(6, 30, 46, .6);
    animation: jshare-rise .22s ease;
    font-family: inherit;
}

.jshare-head {
    position: relative;
    padding: 20px 22px 18px;
    color: #fff;
    background: linear-gradient(120deg, #0b63bb 0%, #0d6492 60%, #06344d 100%);
    overflow: hidden;
}

.jshare-head::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -50px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(249, 166, 2, .2);
}

.jshare-head h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}

.jshare-head p {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: .8rem;
    color: rgba(255, 255, 255, .82);
}

.jshare-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
    transition: background .15s ease;
}

.jshare-close:hover { background: rgba(255, 255, 255, .3); }

.jshare-body {
    padding: 16px 20px 6px;
    overflow-y: auto;
}

.jshare-job {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px dashed #b9d3ee;
    border-radius: 12px;
    background: #f3f8fe;
}

.jshare-job__icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #0b63bb;
    color: #fff;
}

.jshare-job__text { min-width: 0; }

.jshare-job__title {
    font-size: .88rem;
    font-weight: 700;
    color: #17293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jshare-job__company {
    font-size: .75rem;
    color: #6b7f92;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jshare-search {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: 1px solid #e0e7ef;
    border-radius: 10px;
    background: #fafcfe;
}

.jshare-search:focus-within {
    border-color: #0b63bb;
    box-shadow: 0 0 0 3px rgba(11, 99, 187, .12);
}

.jshare-search i { color: #0b63bb; font-size: .85rem; }

.jshare-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: .86rem;
}

.jshare-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6b7f92;
}

.jshare-selectall {
    border: 0;
    background: none;
    padding: 0;
    font-size: .72rem;
    font-weight: 700;
    color: #0b63bb;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}

.jshare-list {
    max-height: 230px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 2px 2px 4px;
}

.jshare-friend {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.jshare-friend:hover { background: #f7fafd; }

.jshare-friend.is-selected {
    border-color: #0b63bb;
    background: #eef6ff;
}

.jshare-friend input { position: absolute; opacity: 0; pointer-events: none; }

.jshare-avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: #e8f1fc;
    border: 1px solid #e0e7ef;
    color: #0b63bb;
    font-weight: 700;
    font-size: .85rem;
}

.jshare-friend__info { flex: 1 1 auto; min-width: 0; }

.jshare-friend__name {
    font-size: .86rem;
    font-weight: 700;
    color: #17293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jshare-friend__meta {
    font-size: .72rem;
    color: #6b7f92;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jshare-check {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 2px solid #cbd7e4;
    border-radius: 50%;
    color: transparent;
    font-size: .65rem;
    transition: all .15s ease;
}

.jshare-friend.is-selected .jshare-check {
    border-color: #0b63bb;
    background: #0b63bb;
    color: #fff;
}

.jshare-note {
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    resize: none;
    border: 1px solid #e0e7ef;
    border-radius: 10px;
    font-size: .84rem;
    font-family: inherit;
    outline: none;
}

.jshare-note:focus {
    border-color: #0b63bb;
    box-shadow: 0 0 0 3px rgba(11, 99, 187, .12);
}

.jshare-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 18px;
}

.jshare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all .16s ease;
}

.jshare-btn--muted { background: #f1f5f9; color: #64748b; border-color: #e0e7ef; }
.jshare-btn--muted:hover { background: #e2e8f0; color: #475569; }
.jshare-btn--primary { background: #0b63bb; color: #fff; box-shadow: 0 8px 16px -8px rgba(11, 99, 187, .8); }
.jshare-btn--primary:hover { background: #095397; color: #fff; }
.jshare-btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

.jshare-state {
    text-align: center;
    padding: 30px 12px 22px;
    color: #6b7f92;
}

.jshare-state > i {
    display: block;
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: #0b63bb;
}

.jshare-state h4 { margin: 0 0 4px; font-size: .95rem; color: #17293b; }
.jshare-state p { margin: 0 0 14px; font-size: .8rem; }

@media (max-width: 480px) {
    .jshare-overlay { align-items: flex-end; padding: 0; }
    .jshare-modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; }
    .jshare-list { max-height: 200px; }
    .jshare-foot .jshare-btn { flex: 1 1 auto; }
}

/* -------------------------------------------- jobseeker_people.php cards */
.shr-card {
    position: relative;
    padding: 14px 16px 14px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #fff;
    transition: box-shadow .18s ease, border-color .18s ease;
}

.shr-card:hover {
    border-color: #cfe0f3;
    box-shadow: 0 12px 26px -18px rgba(11, 99, 187, .55);
}

.shr-card.is-new {
    border-color: #f9a602;
    background: linear-gradient(180deg, #fffaf0 0%, #fff 60%);
}

.shr-card__from {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: .8rem;
    color: #6b7f92;
}

.shr-card__from .ppl-avatar { width: 34px; height: 34px; font-size: .8rem; }
.shr-card__from b { color: #17293b; }
.shr-card__from a { color: inherit; text-decoration: none; }
.shr-card__from a:hover b { color: #0b63bb; }
.shr-card__time { margin-left: auto; font-size: .72rem; white-space: nowrap; }

.shr-badge-new {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f9a602;
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.shr-job {
    display: flex;
    gap: 14px;
    padding: 10px;
    border: 1px solid #e6eef7;
    border-radius: 12px;
    background: #f8fbff;
}

.shr-job__banner {
    flex: 0 0 auto;
    width: 92px;
    height: 92px;
    border-radius: 10px;
    object-fit: cover;
    object-position: top center;
    background: #e8f1fc;
    border: 1px solid #e0e7ef;
}

.shr-job__body { flex: 1 1 auto; min-width: 0; }

.shr-job__title {
    margin: 0 0 3px;
    font-size: .95rem;
    font-weight: 700;
    color: #17293b;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.shr-job__company {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    font-size: .8rem;
    font-weight: 600;
    color: #4b647c;
}

.shr-job__company img {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e0e7ef;
}

.shr-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.shr-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eaf2fb;
    color: #0b63bb;
    font-size: .7rem;
    font-weight: 700;
}

.shr-chip--salary { background: #ecfdf5; color: #15803d; }
.shr-chip--closed { background: #fef2f2; color: #dc2626; }

.shr-quote {
    position: relative;
    margin: 12px 0 0;
    padding: 9px 12px 9px 34px;
    border-radius: 10px;
    background: #fff7e6;
    color: #6b4a00;
    font-size: .82rem;
    font-style: italic;
    overflow-wrap: anywhere;
}

.shr-quote::before {
    content: "\f10d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
    position: absolute;
    left: 12px;
    top: 10px;
    font-size: .7rem;
    color: #f9a602;
}

.shr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.shr-actions .ppl-btn--primary { margin-right: auto; }

@media (max-width: 620px) {
    .shr-job { flex-direction: column; }
    .shr-job__banner { width: 100%; height: 130px; }
    .shr-card__from { flex-wrap: wrap; }
    .shr-actions .ppl-btn { flex: 1 1 auto; justify-content: center; }
}

/* Share popover — shown from a job card's share icon, offers in-platform
   "share with friends" plus external apps (WhatsApp, Facebook, etc). */
.jshare-popover {
    position: absolute;
    z-index: 2000;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 28px -8px rgba(15, 23, 42, .28);
    border: 1px solid #e5e9f0;
    padding: 6px;
}

.jshare-popover__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #17293b;
    cursor: pointer;
}

.jshare-popover__item i { width: 18px; text-align: center; }

.jshare-popover__item:hover {
    background: #f1f5f9;
    color: #17293b;
}

.jshare-popover__divider {
    height: 1px;
    background: #edf1f5;
    margin: 6px 4px;
}
