/**
 * Scouting HRM - Vacancy Detail Page (Single Vacancy)
 * 
 * Styles for the single vacancy/job posting detail page
 */

/* ==========================================================================
   Vacancy Detail Layout
   ========================================================================== */

.shrm-vd-wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    padding: 2rem 1.5rem 3rem;
    align-items: start;
}

.shrm-vd-main,
.shrm-vd-sidebar {
    min-width: 0;
}

@media (max-width: 960px) {
    .shrm-vd-wrap {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-top: 1.5rem;
        padding-bottom: 3rem;
    }
    
    .shrm-vd-main {
        order: 1;
    }
    
    .shrm-vd-sidebar {
        order: 2;
        width: 100%;
    }
    
    .shrm-vd-cta {
        display: none;
    }
    
    .shrm-vd-share-wrap {
        display: none;
    }
    
    .shrm-vd-title {
        font-size: 1.5rem;
    }
    
    .shrm-vd-tagline {
        font-size: 1rem;
    }
}

/* Vacancy detail title */
.shrm-vd-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.shrm-vd-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0 0 1rem;
}

.shrm-vd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Content sections */
.shrm-vd-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--grey-200);
}

.shrm-vd-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.shrm-vd-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--scouting-green);
    margin: 0 0 0.75rem;
}

/* ==========================================================================
   Sidebar Card
   ========================================================================== */

.shrm-vd-card {
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: calc(72px + 1.5rem);
    box-shadow: 0 2px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 960px) {
    .shrm-vd-card {
        position: static;
        top: auto;
        width: 100%;
        box-sizing: border-box;
        padding: 1.25rem;
        box-shadow: 0 1px 3px rgba(0,0,0,.04);
        border-radius: 8px;
        margin-bottom: 1rem;
    }
}

.shrm-vd-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 3px solid var(--scouting-orange);
    letter-spacing: -0.01em;
}

/* Metadata rows */
.shrm-vd-meta-list {
    margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.shrm-vd-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.shrm-vd-meta-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--scouting-green);
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shrm-vd-meta-body {
    flex: 1;
    min-width: 0;
}

.shrm-vd-meta-row dt {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.shrm-vd-meta-row dd {
    margin: 0;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.45;
}

.shrm-vd-meta-sub {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Contact lines in sidebar */
.shrm-vd-contact-line {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.shrm-vd-contact-line:last-child {
    margin-bottom: 0;
}

.shrm-vd-contact-role {
    color: var(--text-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.shrm-vd-card .shrm-vd-contact-link {
    -webkit-appearance: none;
    appearance: none;
    display: inline;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    color: var(--scouting-blue);
    text-decoration: none;
    cursor: pointer;
    line-height: inherit;
    box-shadow: none;
    outline: none;
    border-radius: 0;
    white-space: normal;
    text-align: left;
    font-weight: inherit;
}

.shrm-vd-card .shrm-vd-contact-link:hover {
    border: none;
    background: none;
    padding: 0;
    text-decoration: underline;
    color: var(--scouting-blue);
}

.shrm-vd-card .shrm-vd-contact-link:active {
    border: none;
    background: none;
    padding: 0;
    color: var(--scouting-blue-dark);
    text-decoration: underline;
}

.shrm-vd-card .shrm-vd-contact-link:focus-visible {
    border: none;
    background: none;
    padding: 0;
    outline: 2px solid var(--scouting-blue);
    outline-offset: 1px;
    border-radius: 2px;
}

/* CTA section */
.shrm-vd-cta {
    border-top: 1px solid var(--grey-200);
    padding-top: 1.25rem;
}

.shrm-vd-cta-label {
    font-weight: 800;
    font-size: 1rem;
    color: var(--scouting-orange);
    margin: 0 0 0.875rem;
    letter-spacing: -0.01em;
}

.shrm-vd-cta-btn {
    display: flex !important;
    width: 100% !important;
    text-align: center;
    justify-content: center;
    white-space: normal !important;
    word-break: break-word;
    line-height: 1.35;
    padding: 0.875rem 1.25rem !important;
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease !important;
    margin-bottom: 0.625rem;
}

.shrm-vd-cta-btn:last-child {
    margin-bottom: 0;
}

.shrm-btn--primary.shrm-vd-cta-btn:hover {
    background: var(--scouting-orange-dark) !important;
    border-color: var(--scouting-orange-dark) !important;
    box-shadow: 0 4px 14px rgba(245,130,32,.35);
    transform: translateY(-1px);
}

.shrm-btn--primary.shrm-vd-cta-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 4px rgba(245,130,32,.15) !important;
}

.shrm-btn--outline-green.shrm-vd-cta-btn:hover {
    background: rgba(0,168,89,.06) !important;
    box-shadow: 0 4px 14px rgba(0,168,89,.2);
    transform: translateY(-1px);
}

.shrm-btn--outline-green.shrm-vd-cta-btn:active {
    background: rgba(0,168,89,.12) !important;
    transform: translateY(0) !important;
    box-shadow: 0 1px 4px rgba(0,168,89,.1) !important;
}

/* Share dropdown */
.shrm-vd-share-wrap {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--grey-200);
    text-align: center;
    position: relative;
}

.shrm-share-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #333333 !important;
    font-size: 0.875rem;
    font-weight: 500;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease;
    font-family: var(--font-family);
}

.shrm-share-toggle-btn:hover {
    color: var(--scouting-orange);
    background: rgba(245,130,32,.06);
}

.shrm-share-toggle-btn:active {
    background: rgba(245,130,32,.12);
    color: var(--scouting-orange-dark);
    transform: scale(0.94);
}

.shrm-share-toggle-btn:focus-visible {
    outline: 2px solid var(--scouting-orange);
    outline-offset: 2px;
}

.shrm-share-dropdown-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--bg-white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    text-align: left;
}

.shrm-share-dropdown-menu.is-open {
    display: block;
}

.shrm-share-panel--sub {
    display: none;
}

.shrm-share-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
    font-family: var(--font-family);
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
}

.shrm-share-menu-item:hover {
    background: rgba(245,130,32,.06);
    color: var(--scouting-orange);
    text-decoration: none;
}

.shrm-share-menu-item:active {
    background: rgba(245,130,32,.12);
    color: var(--scouting-orange-dark);
}

.shrm-share-menu-item:focus-visible {
    outline: 2px solid var(--scouting-orange);
    outline-offset: -2px;
}

.shrm-share-chevron {
    margin-left: auto;
    flex-shrink: 0;
}

.shrm-share-divider {
    margin: 0;
    border: none;
    border-top: 1px solid var(--grey-200);
}

.shrm-share-item--back {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.shrm-share-item--back:hover {
    color: var(--text-primary);
    background: var(--grey-50);
}

.shrm-share-item--report {
    color: var(--text-muted);
}

.shrm-share-item--report:hover {
    color: var(--scouting-red);
    background: rgba(227,6,19,.05);
}

/* Back link on hero */
.shrm-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(0,0,0,.25);
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    transition: background 0.15s;
}

.shrm-back-link:hover {
    background: rgba(0,0,0,.4);
    color: #fff;
}

.shrm-back-link:active {
    background: rgba(0,0,0,.55);
    transform: scale(0.96);
}

.shrm-back-link:focus-visible {
    outline: 2px solid rgba(255,255,255,.8);
    outline-offset: 2px;
}

.shrm-back-link--dark {
    color: var(--text-primary);
    background: rgba(0,0,0,.08);
}

.shrm-back-link--dark:hover {
    background: rgba(0,0,0,.16);
    color: var(--text-primary);
}

.shrm-back-link--dark:active {
    background: rgba(0,0,0,.24);
    transform: scale(0.96);
}

.shrm-back-link--dark:focus-visible {
    outline: 2px solid var(--scouting-orange);
    outline-offset: 2px;
}

/* Member field note */
.shrm-member-field-note {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* Mobile sticky CTA bar */
.shrm-vd-mobile-cta-bar {
    display: none;
}

@media (max-width: 960px) {
    .shrm-vd-mobile-cta-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 400;
        background: #fff;
        border-top: 1px solid var(--grey-200);
        box-shadow: 0 -4px 16px rgba(0,0,0,.08);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    
    .shrm-vd-mobile-cta-bar__inner {
        display: flex;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
        max-width: 100%;
    }
    
    .shrm-vd-mobile-cta-btn {
        flex: 1;
        display: flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal !important;
        word-break: break-word;
        line-height: 1.35;
        font-size: 0.9375rem !important;
        font-weight: 700 !important;
        padding: 0.875rem 0.75rem !important;
        border-radius: 8px !important;
        min-width: 0;colorrgb(255, 255, 255)
        background-colorrgba(0, 0, 0, 0)
        min-height: 44px;
        transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease !important;
    }
    
    .shrm-btn--primary.shrm-vd-mobile-cta-btn:hover,
    .shrm-btn--primary.shrm-vd-mobile-cta-btn:active {
        background: var(--scouting-orange-dark) !important;
        border-color: var(--scouting-orange-dark) !important;
        box-shadow: 0 3px 10px rgba(245,130,32,.35);
    }
    
    .shrm-btn--outline-green.shrm-vd-mobile-cta-btn:hover,
    .shrm-btn--outline-green.shrm-vd-mobile-cta-btn:active {
        background: rgba(0,168,89,.06) !important;
        box-shadow: 0 3px 10px rgba(0,168,89,.2);
    }
}