/* ============================================================
   JD Showcase – Frontend Styles
   Design: light card layout, dark navy tabs, yellow CTA
   ============================================================ */

/* ── CSS Custom Properties ───────────────────────────────── */
.jds-showcase {
    --jds-font-sans:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Brand palette */
    --jds-navy:             #1a2b4a;
    --jds-navy-dark:        #0f1d32;
    --jds-navy-mid:         #243558;
    --jds-blue-light:       #e8edf5;
    --jds-blue-accent:      #2c5282;

    --jds-gold:             #d4a017;
    --jds-gold-hover:       #b8880f;
    --jds-gold-text:        #fff;

    /* Surface */
    --jds-bg:               #f0f4f8;
    --jds-card-bg:          #ffffff;
    --jds-card-border:      #dce4ef;
    --jds-card-hover:       #e8f0fb;
    --jds-card-active-bg:   #dbeafe;
    --jds-card-active-border: #3b82f6;

    /* Text */
    --jds-text-primary:     #1a2b4a;
    --jds-text-secondary:   #4a5568;
    --jds-text-muted:       #718096;
    --jds-text-light:       #a0aec0;

    /* Badge colours */
    --jds-badge-level-bg:   #eff6ff;
    --jds-badge-level-text: #1e40af;
    --jds-badge-salary-bg:  #f0fdf4;
    --jds-badge-salary-text:#166534;
    --jds-badge-reports-bg: #faf5ff;
    --jds-badge-reports-text:#6b21a8;
    --jds-badge-loc-bg:     #fff7ed;
    --jds-badge-loc-text:   #9a3412;
    --jds-badge-type-bg:    #fdf2f8;
    --jds-badge-type-text:  #9d174d;

    /* Layout */
    --jds-radius-sm:        6px;
    --jds-radius-md:        10px;
    --jds-radius-lg:        14px;
    --jds-sidebar-w:        400px;
    --jds-gap:              20px;

    /* Motion */
    --jds-ease:             cubic-bezier(.4,0,.2,1);
    --jds-dur-fast:         150ms;
    --jds-dur-mid:          250ms;

    font-family: var(--jds-font-sans);
    color: var(--jds-text-primary);
    box-sizing: border-box;
    max-width: 1180px;
    margin: 0 auto;
}

.jds-showcase *,
.jds-showcase *::before,
.jds-showcase *::after {
    box-sizing: inherit;
}

/* ── Tabs ────────────────────────────────────────────────── */
.jds-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 6px;
    border-radius: 50px;
    width: fit-content;
    margin: 0 auto 28px;
}

.jds-tabs__btn {
    cursor: pointer;
    padding: 15px 25px !important;
    color: #4F5665;
text-align: center;
font-family: "avenir regular", Sans-serif !important;
font-size: 16px !important;
font-style: normal !important;
font-weight: 700 !important;
line-height: normal;
    background: transparent;
	border-radius: 69px;
border: 1px solid #4F5665;
    transition: background var(--jds-dur-fast) var(--jds-ease),
                color     var(--jds-dur-fast) var(--jds-ease),
                box-shadow var(--jds-dur-fast) var(--jds-ease);
    white-space: nowrap;
    line-height: 1.2;
}

.jds-tabs__btn:hover {
    background: rgba(255,255,255,.7);
    color: #4F5665;
}

.jds-tabs__btn--active {
    border-radius: 69px;
background: linear-gradient(180deg, #194862 0%, #060C18 100%);
    color: #ffffff;
    
}

.jds-tabs__btn--active:hover {
    background: var(--jds-navy-dark);
    color: #ffffff;
}

.jds-tabs__btn:focus-visible {
    outline: 2px solid var(--jds-blue-accent);
    outline-offset: 2px;
}

/* ── Level Header ────────────────────────────────────────── */
.jds-level-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 0 16px;
    transition: opacity var(--jds-dur-mid) var(--jds-ease);
}

.jds-level-header.jds-is-loading {
    opacity: .5;
}

.jds-level-header__title {
color: #184863 !important;
	text-transform: none !important;
text-align: center;
text-shadow: 0 4px 4px rgba(0, 0, 0, 0.06);
font-family: "avenir cyr demi", Sans-serif !important;
font-size: 40px !important;
font-style: normal !important;
font-weight: 700;
line-height: normal;
    margin: 0 0 10px;

}

.jds-level-header__desc {
color: #13274B;
text-align: center;
font-family: "Avenir Next Cyr";
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: normal;
   
    margin: 0 auto;

}

/* ── Search Bar ──────────────────────────────────────────── */
.jds-search-bar {
    margin-bottom: 20px;
    display: none; /* shown via JS when > 3 jobs */
}

.jds-search-bar--visible {
    display: block;
}

.jds-search-bar__input {
    width: 100%;
    max-width: 440px;
    display: block;
    margin: 0 auto;
    padding: 10px 16px;
    border: 1.5px solid var(--jds-card-border);
    border-radius: 50px;
    font-family: var(--jds-font-sans);
    font-size: 14px;
    color: var(--jds-text-primary);
    background: #fff;
    transition: border-color var(--jds-dur-fast) var(--jds-ease),
                box-shadow   var(--jds-dur-fast) var(--jds-ease);
    outline: none;
}

.jds-search-bar__input:focus {
    border-color: var(--jds-blue-accent);
    box-shadow: 0 0 0 3px rgba(44,82,130,.15);
}

/* ── Master-Detail Layout ────────────────────────────────── */
.jds-layout {
    display: grid;
    grid-template-columns: var(--jds-sidebar-w) 1fr;
    gap: var(--jds-gap);
    align-items: start;
}

/* ── Sidebar / Card List ─────────────────────────────────── */
.jds-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #dce4ef00 transparent;
}

.jds-sidebar::-webkit-scrollbar {
    width: 4px;
}
.jds-sidebar::-webkit-scrollbar-thumb {
    background: var(--jds-card-border);
    border-radius: 4px;
}

.jds-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Job Card ────────────────────────────────────────────── */
.jds-card {
    background: transparent;
border-radius: 40px;
border: 1px solid #B3CFE8;
    padding: 30px;
    cursor: pointer;
    transition: background    var(--jds-dur-fast) var(--jds-ease),
                border-color  var(--jds-dur-fast) var(--jds-ease),
                box-shadow    var(--jds-dur-fast) var(--jds-ease),
                transform     var(--jds-dur-fast) var(--jds-ease);
    outline: none;
}

.jds-card:hover {
    border-radius: 40px;
border: 1px solid #B3CFE8;
background: rgba(91, 153, 201, 0.15);
    transform: translateY(-1px);
}

.jds-card--active {
   border-radius: 40px;
border: 1px solid #B3CFE8;
background: rgba(91, 153, 201, 0.15);
}

.jds-card--active:hover {
    background: var(--jds-card-active-bg);
}

.jds-card:focus-visible {
    outline: 2px solid var(--jds-blue-accent);
    outline-offset: 2px;
}

.jds-card__body {}

.jds-card__title {
 color: #13274B !important;
text-shadow: 0 4px 4px rgba(0, 0, 0, 0.06);
font-family: "avenir cyr demi", Sans-serif !important;
font-size: 24px !important;
font-style: normal !important;
font-weight: 700 !important;
line-height: normal;
	text-transform: none !important;
    margin: 0 0 4px;
    
}

.jds-card__experience {
    color: #4F5665;
font-family: "Avenir Next Cyr";
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: normal;
    margin: 0 0 10px;
}
.jds-sidebar .jds-badge--level,.jds-sidebar  .jds-badge--salary {
    border-radius: 34px;
    background: transparent;
	color: #2E2E2F;
font-family: "avenir cyr demi", Sans-serif;
font-size: 16px;
	padding:0;
font-style: normal;
font-weight: 500;
line-height: normal;
}
.jds-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.jds-sidebar .jds-card__meta
 {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 15px 0;
    flex-direction: column;
}
.jds-card__preview {
   color: #13274B;
font-family: "Avenir Next Cyr";
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: normal;
    margin: 0;
}

/* ── Badges / Pills ──────────────────────────────────────── */
.jds-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  border-radius: 34px;
background: #C4E5FF;
    color: #0081B5;
font-family: "Avenir Next";
font-size: 13px;
font-style: normal;
font-weight: 500;
line-height: normal;
}

.jds-badge--level {
 border-radius: 34px;
background: #C4E5FF;
}

.jds-badge--salary {
border-radius: 34px;
background: #C4E5FF;
}

.jds-badge--reports {
 border-radius: 34px;
background: #C4E5FF;
}

.jds-badge--location {
    border-radius: 34px;
background: #C4E5FF;
}

.jds-badge--type {
   border-radius: 34px;
background: #C4E5FF;
}

.jds-badge__icon {
    flex-shrink: 0;
}

/* ── Detail Panel ────────────────────────────────────────── */
.jds-detail-wrap {
    min-height: 400px;
    position: relative;
}

.jds-detail-inner {
    transition: opacity var(--jds-dur-mid) var(--jds-ease);
}

.jds-detail-inner.jds-is-loading {
    opacity: .4;
    pointer-events: none;
}

.jds-detail {
    border-radius: 40px;
border: 1px solid #B3CFE8;
background: rgba(91, 153, 201, 0.15);
    overflow: hidden;
}

/* Detail Header */
.jds-detail__header {
    padding: 24px 28px 20px;
    
}

.jds-detail__title {
color: #13274B !important;
text-shadow: 0 4px 4px rgba(0, 0, 0, 0.06);
font-family: "avenir cyr demi", Sans-serif !important;
font-size: 32px !important;
	text-transform: none !important;
font-style: normal !important;
font-weight: 700 !important;
line-height: normal !important;
    margin: 0 0px;

}

.jds-detail__experience {
   color: #4F5665 ;
font-family: "avenir regular", Sans-serif !important;
font-size: 18px;
font-style: normal;
font-weight: 400;
line-height: normal;
    margin: 0 0 24px;
}

.jds-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

/* Sections */
.jds-detail__section {
    padding: 20px 28px;

}

.jds-detail__section:last-of-type {
    border-bottom: none;
}

.jds-detail__section-title {
color: #13274B !important;
font-family: "avenir cyr demi", Sans-serif !important;
font-size: 20px !important; 
font-style: normal;
font-weight: 400 !important;
line-height: normal !important;
	text-transform: none !important;
    margin: 0 0 12px !important;
 
}

.jds-detail__section-body {
    color: #13274B;
font-family: "avenir regular", Sans-serif !important;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: normal;
    margin: 0;
}

.jds-detail__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jds-detail__list-item {
    color: #13274B;
font-family: "avenir regular", Sans-serif !important;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: normal;
    padding-left: 18px;
    position: relative;
}

.jds-detail__list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--jds-blue-accent);
    flex-shrink: 0;
}

/* Footer / CTA */
.jds-detail__footer {
    padding: 20px 28px 24px;
 
}

/* ── Copy JD Button ──────────────────────────────────────── */
.jds-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    border-radius: var(--jds-radius-sm);
    padding: 12px 26px;
   border-radius: 10px;
background: #FF9E1B;
    color: var(--jds-gold-text);
    font-family: var(--jds-font-sans);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: background    var(--jds-dur-fast) var(--jds-ease),
                box-shadow    var(--jds-dur-fast) var(--jds-ease),
                transform     var(--jds-dur-fast) var(--jds-ease);
    outline: none;
}

.jds-copy-btn:hover {
    background: var(--jds-gold-hover);
    box-shadow: 0 4px 14px rgba(212,160,23,.35);
    transform: translateY(-1px);
}

.jds-copy-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.jds-copy-btn:focus-visible {
    outline: 2px solid var(--jds-gold);
    outline-offset: 3px;
}

.jds-copy-btn--success {
    background: #16a34a;
}

.jds-copy-btn__icon {
    flex-shrink: 0;
    transition: opacity var(--jds-dur-fast);
}

/* ── Loading Spinner ─────────────────────────────────────── */
.jds-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.jds-loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid var(--jds-card-border);
    border-top-color: var(--jds-navy);
    border-radius: 50%;
    animation: jds-spin 700ms linear infinite;
}

@keyframes jds-spin {
    to { transform: rotate(360deg); }
}

/* ── Empty State ─────────────────────────────────────────── */
.jds-empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--jds-text-muted);
}

.jds-empty-state__icon {
    margin-bottom: 16px;
    opacity: .4;
}

.jds-empty-state__msg {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--jds-text-secondary);
}

.jds-empty-state__sub {
    font-size: 14px;
    margin: 0;
}

/* ── Mobile Toggle ───────────────────────────────────────── */
.jds-mobile-back {
    display: none;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--jds-font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--jds-blue-accent);
    padding: 0;
    margin-bottom: 16px;
}

.jds-mobile-back svg {
    flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────── */

/* Tablet */
@media (max-width: 900px) {
    .jds-layout {
        grid-template-columns: 280px 1fr;
    }

    .jds-card {
        padding: 20px;
    }

    .jds-card__title {
        font-size: 20px !important;
    }
}

/* Mobile */
@media (max-width: 640px) {
    /* Tabs — scroll horizontally, reduce padding (!important needed to override desktop !important) */
    .jds-tabs {
        gap: 6px;
        padding: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
        width: 100%;
        justify-content: flex-start;
    }

    .jds-tabs__btn {
        padding: 10px 16px !important;
        font-size: 14px !important;
        flex-shrink: 0;
    }

    /* Level header title — was 40px !important, too big on mobile */
    .jds-level-header__title {
        font-size: 26px !important;
    }

    .jds-level-header__desc {
        font-size: 14px;
    }

    /* Stack layout */
    .jds-layout {
        display: block;
    }

    .jds-sidebar,
    .jds-detail-wrap {
        width: 100%;
    }

    /* Cards — reduce padding and font sizes */
    .jds-card {
        padding: 18px 16px;
        border-radius: 20px;
    }

    .jds-card__title {
        font-size: 18px !important;
    }

    .jds-card__preview {
        font-size: 14px;
    }

    /* Detail panel */
    .jds-detail {
        border-radius: 20px;
    }

    .jds-detail__title {
        font-size: 22px !important;
    }

    .jds-detail__experience {
        font-size: 15px !important;
    }

    .jds-detail__section-title {
        font-size: 17px !important;
    }

    .jds-detail__section-body,
    .jds-detail__list-item {
        font-size: 14px !important;
    }

    .jds-detail__header,
    .jds-detail__section,
    .jds-detail__footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Mobile toggle — hide detail, show list first */
    .jds-detail-wrap {
        display: none;
    }

    .jds-showcase.jds-mobile-detail-open .jds-sidebar {
        display: none;
    }

    .jds-showcase.jds-mobile-detail-open .jds-detail-wrap {
        display: block;
    }

    .jds-mobile-back {
        display: flex;
    }

    .jds-sidebar {
        position: static;
        max-height: none;
    }

    /* Badges wrap cleanly */
    .jds-detail__badges {
        gap: 6px;
    }

    .jds-badge {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Print */
@media print {
    .jds-tabs,
    .jds-sidebar,
    .jds-search-bar,
    .jds-copy-btn {
        display: none !important;
    }
    .jds-layout {
        display: block;
    }
}
