/* =====================================
   RECENT JOBS SIDEBAR
   Mirrors the card styling used for job
   listings on huntyourtribe.com/jobs
===================================== */

.gh-content {
    position: relative;
}

.gh-jobs-sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    margin-top: 20px;
    margin-left: 40px;

    grid-column: main-end / wide-end;
}

.gh-jobs-card {
    position: sticky;
    top: 20px;

    width: calc(100% + var(--jobs-expand-right, 220px));
    max-width: none;
    box-sizing: border-box;
    max-height: none;
    height: calc(100vh - 40px); 

    /* Converted to Flexbox to anchor the bottom link */
    display: flex;
    flex-direction: column;

    overflow: hidden; /* Hide card overflow so inner list handles scrolling */
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 24px;

    font-family: Inter, sans-serif;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.gh-jobs-card a {
    text-decoration: none;
}

/* =====================================
   HEADER
===================================== */

.gh-jobs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 16px;
    flex-shrink: 0; /* Prevents header from shrinking */
}

.gh-jobs-title {
    font-size: 18px;
    font-weight: 600;
    color: #111111;
    text-align: center;
    flex: 1;
}

/* .gh-jobs-viewall {
    display: block;        
    width: max-content;    
    margin: 12px auto 0;   
    flex-shrink: 0;        
    
    font-size: 14px;
    font-weight: 600;
    color: #111111;
    text-decoration: none;
    white-space: nowrap;
}

.gh-jobs-viewall:hover {
    color: #52525b;
} */


.gh-jobs-viewall {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: max-content;
    margin: 16px auto 0;
    flex-shrink: 0;

    height: 44px;
    padding: 0 24px;
    border-radius: 14px;

    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;

    background-color: #0084ff;
    color: #ffffff !important;

    transition: background-color 0.15s ease, transform 0.1s ease;
}

.gh-jobs-viewall:hover {
    background-color: #0070da;
    color: #ffffff !important;
}
/* Arrow Icon Generation via Pure CSS Shapes */
.gh-jobs-arrow {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-top: 2.5px solid #ffffff;  /* Thickness of the arrow line */
    border-right: 2.5px solid #ffffff;
    transform: rotate(45deg);         /* Rotates box to point right (>) */
    margin-left: 2px;
}



/* Click/Active State Press Effect */
.gh-jobs-viewall:active {
    transform: scale(0.97);       /* Creates a tactile physical press effect */
}


/* =====================================
   LIST / ROWS
===================================== */

.gh-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 2px;

    /* Flex-grow allows list to fill middle space and scroll independently */
    flex: 1 1 auto;
    overflow-y: auto;
    scrollbar-width: none;
}

.gh-jobs-list::-webkit-scrollbar {
    display: none;
}

.gh-job-row {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px;
    border-radius: 10px;

    text-decoration: none;

    transition: background-color .15s ease;
}

.gh-job-row:hover {
    background-color: #f4f4f5;
}

.gh-job-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 32px;
    height: 32px;

    border-radius: 6px;
    overflow: hidden;

    background: #f4f4f5;

    font-size: 12px;
    font-weight: 600;
    color: #3f3f46;
}

.gh-job-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gh-job-info {
    min-width: 0;
    flex: 1 1 auto;
}

.gh-job-title {
    display: block;

    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #27272a;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-job-company {
    display: block;
    margin-top: 2px;

    font-size: 12px;
    color: #71717a;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-job-meta {
    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;

    font-size: 11px;
    color: #a1a1aa;
}

.gh-job-location {
    max-width: 90px;

    font-style: italic;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-job-age {
    font-variant-numeric: tabular-nums;
}

/* =====================================
   SKELETON / EMPTY / ERROR STATES
===================================== */

.gh-job-row-skeleton {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.gh-job-skel-logo,
.gh-job-skel-line {
    border-radius: 6px;
    background: #ececec;
    animation: gh-jobs-pulse 1.4s ease-in-out infinite;
}

.gh-job-skel-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.gh-job-skel-lines {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gh-job-skel-line {
    height: 8px;
}

.gh-job-skel-line.short {
    width: 60%;
}

@keyframes gh-jobs-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

.gh-jobs-empty,
.gh-jobs-error {
    padding: 12px 4px;

    font-size: 13px;
    color: #71717a;
    text-align: center;
}

/* =====================================
   LAPTOP / MEDIUM SCREENS
===================================== */

@media (max-width: 1600px) {

    .gh-jobs-sidebar {
        margin-left: 40px;
    }

    .gh-jobs-card {
        width: calc(100% + 200px);
        max-width: none;
        padding: 20px;
    }

    .gh-job-location {
        max-width: 60px;
    }
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 1200px) {

    .gh-jobs-sidebar {
        position: relative;
        margin-top: 24px;
        margin-left: 0;
        grid-column: auto;
    }

    .gh-jobs-card {
        position: relative;
        width: 100%;
        max-width: none;
        max-height: none;
        top: 0;

        padding: 24px;

        border-radius: 16px;
    }

    .gh-job-location {
        max-width: 140px;
    }
}

@media (max-width: 768px) {

    .gh-jobs-sidebar {
        width: 100% !important;
        max-width: 100% !important;

        margin: 20px 0 0 0 !important;

        grid-column: auto !important;
    }

    .gh-jobs-card {
        width: 100% !important;
        max-width: 100% !important;

        box-sizing: border-box;
    }
}
