/* DoctorBookly Careers — Indeed-style job board */
:root {
    --dbk-indeed-blue: #1a3d6d;
    --dbk-indeed-blue-hover: #0f2a4d;
    --dbk-indeed-teal: #2e9e80;
    --dbk-indeed-border: #e4e2e0;
    --dbk-indeed-bg: #f3f2f1;
    --dbk-indeed-text: #2d2d2d;
    --dbk-indeed-muted: #595959;
    --dbk-indeed-link: #1a3d6d;
    --dbk-indeed-selected: #1a3d6d;
}

.dbk-careers-body--indeed {
    font-family: 'Source Sans Pro', system-ui, sans-serif;
    background: var(--dbk-indeed-bg);
    color: var(--dbk-indeed-text);
    overflow-x: hidden;
}

.dbk-indeed {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* —— Search header —— */
.dbk-indeed-search {
    background: #fff;
    border-bottom: 1px solid var(--dbk-indeed-border);
    padding: 20px 16px 14px;
}

.dbk-indeed-search__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.dbk-indeed-search__title {
    font-family: Poppins, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--dbk-indeed-blue);
}

.dbk-indeed-search__lead {
    margin: 0 0 14px;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--dbk-indeed-muted);
    max-width: 760px;
}

.dbk-indeed-search__bar {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: end;
    background: #fff;
    border: 1px solid var(--dbk-indeed-border);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.dbk-indeed-search__field { display: flex; flex-direction: column; gap: 4px; }

.dbk-indeed-search__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dbk-indeed-muted);
}

.dbk-indeed-search__input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--dbk-indeed-border);
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
    min-height: 44px;
}

.dbk-indeed-search__input-wrap i { color: var(--dbk-indeed-muted); font-size: 0.875rem; }

.dbk-indeed-search__input-wrap input,
.dbk-indeed-search__input-wrap select {
    border: none;
    flex: 1;
    font: inherit;
    font-size: 0.9375rem;
    padding: 10px 0;
    background: transparent;
    outline: none;
    min-width: 0;
}

.dbk-indeed-find-btn {
    background: var(--dbk-indeed-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    min-height: 44px;
    white-space: nowrap;
}

.dbk-indeed-find-btn:hover { background: var(--dbk-indeed-blue-hover); }

/* —— Filters (compact row) —— */
.dbk-indeed-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
    margin-top: 12px;
}

.dbk-indeed-filters__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1 1 280px;
}

.dbk-indeed-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dbk-indeed-filter__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dbk-indeed-muted);
}

.dbk-indeed-filters__row--single {
    grid-template-columns: minmax(180px, 260px);
    max-width: 320px;
}

.dbk-indeed-filter__select {
    width: 100%;
    border: 1px solid var(--dbk-indeed-border);
    border-radius: 8px;
    padding: 9px 12px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dbk-indeed-text);
    background: #fff;
    min-height: 40px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23595959' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.dbk-indeed-filter__select:focus {
    outline: none;
    border-color: var(--dbk-indeed-blue);
    box-shadow: 0 0 0 3px rgba(26, 61, 109, 0.1);
}

.dbk-indeed-filters__clear {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: none;
    background: transparent;
    color: var(--dbk-indeed-blue);
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    min-height: 40px;
}

.dbk-indeed-filters__clear[hidden] { display: none !important; }

.dbk-indeed-filters__clear:hover { color: var(--dbk-indeed-blue-hover); }

/* —— Split board —— */
.dbk-indeed-board {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    border-left: 1px solid var(--dbk-indeed-border);
    border-right: 1px solid var(--dbk-indeed-border);
    background: #fff;
}

.dbk-indeed-list {
    border-right: 1px solid var(--dbk-indeed-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dbk-indeed-list__head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--dbk-indeed-border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: #fafafa;
}

.dbk-indeed-list__head h2 {
    font-family: Poppins, sans-serif;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 700;
}

.dbk-indeed-list__head p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--dbk-indeed-muted);
    font-weight: 600;
}

.dbk-indeed-list__hint {
    display: none;
    margin: 0;
    padding: 8px 16px 10px;
    font-size: 0.75rem;
    color: var(--dbk-indeed-muted);
    background: #fafafa;
    border-bottom: 1px solid var(--dbk-indeed-border);
}

html.dbk-careers-mobile-list-only .dbk-indeed-list__hint {
    display: block;
}

    .dbk-indeed-list__scroll {
        overflow-y: auto;
        flex: 0 0 auto;
        max-height: calc(100vh - 280px);
    }

.dbk-indeed-list__empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--dbk-indeed-muted);
    font-size: 0.875rem;
}

.dbk-indeed-list__empty button {
    margin-top: 8px;
    background: none;
    border: none;
    color: var(--dbk-indeed-blue);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

/* —— List items (Indeed cards) —— */
.dbk-indeed-item {
    border-bottom: 1px solid var(--dbk-indeed-border);
}

.dbk-indeed-item__btn {
    width: 100%;
    text-align: left;
    padding: 16px;
    border: none;
    background: #fff;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}

.dbk-indeed-item__btn:hover { background: #f8fafc; }

.dbk-indeed-item.is-selected .dbk-indeed-item__btn {
    background: #f0f7ff;
    border-left-color: var(--dbk-indeed-selected);
}

.dbk-indeed-item[hidden] { display: none; }

.dbk-indeed-item__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.dbk-indeed-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.dbk-indeed-badge--apply { background: #e8f0fe; color: #1a3d6d; }
.dbk-indeed-badge--new { background: #fce8ef; color: #9d174d; }

.dbk-indeed-item__title {
    font-family: Poppins, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--dbk-indeed-link);
    line-height: 1.35;
}

.dbk-indeed-item__meta {
    margin: 0 0 10px;
    font-size: 0.8125rem;
    color: var(--dbk-indeed-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.dbk-indeed-item__meta-brand {
    font-weight: 600;
    color: var(--dbk-indeed-text);
}

.dbk-indeed-item__meta-sep { opacity: 0.55; }

.dbk-indeed-item__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dbk-indeed-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

/* —— Detail panel —— */
.dbk-indeed-detail {
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    padding: 0;
    background: #fff;
}

.dbk-indeed-detail__placeholder[hidden],
.dbk-indeed-detail__content[hidden] {
    display: none !important;
}

html.dbk-careers-mobile-list-only .dbk-indeed-detail {
    display: none !important;
}

@media (max-width: 899px) {
    html.dbk-careers-no-role .dbk-indeed-detail,
    html.dbk-careers-no-role #careersDetailPanel {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    html.dbk-careers-mobile-open .dbk-indeed-detail.is-open,
    html.dbk-careers-has-role .dbk-indeed-detail.is-open {
        display: block !important;
        height: auto !important;
    }

    html.dbk-careers-no-role .dbk-indeed-list__hint,
    html.dbk-careers-mobile-list-only .dbk-indeed-list__hint {
        display: block;
    }

    html.dbk-careers-mobile-open .dbk-indeed-list__hint {
        display: none;
    }
}

html.dbk-careers-mobile-list-only .dbk-indeed-detail.is-open,
html.dbk-careers-mobile-open .dbk-indeed-detail.is-open,
html.dbk-careers-has-role .dbk-indeed-detail.is-open {
    display: block !important;
}

html.dbk-careers-mobile-list-only .dbk-indeed-detail__content {
    display: none !important;
}

html.dbk-careers-mobile-list-only .dbk-indeed-detail.is-open .dbk-indeed-detail__content.is-open,
html.dbk-careers-mobile-open .dbk-indeed-detail__content.is-open {
    display: block !important;
}

html.dbk-careers-mobile-list-only .dbk-indeed-detail__placeholder {
    display: none !important;
}

.dbk-indeed-detail__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    color: var(--dbk-indeed-muted);
    gap: 10px;
    padding: 20px 24px;
    font-size: 0.875rem;
}

.dbk-indeed-detail__placeholder i { font-size: 2rem; opacity: 0.3; }

.dbk-indeed-detail__content { padding: 0 28px 40px; }

.dbk-indeed-detail__header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
    padding: 22px 0 18px;
    margin: 0 -28px;
    padding-left: 28px;
    padding-right: 28px;
    border-bottom: 1px solid var(--dbk-indeed-border);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.9);
}

.dbk-indeed-detail__title {
    font-family: Poppins, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--dbk-indeed-text);
    line-height: 1.25;
}

.dbk-indeed-detail__company {
    margin: 0 0 4px;
    font-size: 0.9375rem;
}

.dbk-indeed-detail__company strong { color: var(--dbk-indeed-link); }

.dbk-indeed-detail__company span::before { content: '· '; color: var(--dbk-indeed-muted); }

.dbk-indeed-detail__meta {
    margin: 0 0 18px;
    font-size: 0.875rem;
    color: var(--dbk-indeed-muted);
}

.dbk-indeed-detail__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.dbk-indeed-apply-btn {
    background: var(--dbk-indeed-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(26, 61, 109, 0.25);
    flex: 1 1 auto;
    justify-content: center;
    max-width: 100%;
}

.dbk-indeed-apply-btn:hover { background: var(--dbk-indeed-blue-hover); }

.dbk-indeed-apply-btn__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 5px;
    font-size: 0.8rem;
}

.dbk-indeed-apply-btn--full { width: 100%; justify-content: center; }

.dbk-indeed-share {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dbk-indeed-border);
    border-radius: 8px;
    color: var(--dbk-indeed-muted);
    text-decoration: none;
}

.dbk-indeed-share:hover { border-color: var(--dbk-indeed-blue); color: var(--dbk-indeed-blue); }

.dbk-indeed-detail__facts {
    border-bottom: 1px solid var(--dbk-indeed-border);
    padding: 18px 0;
    margin-bottom: 20px;
}

.dbk-indeed-detail__facts h3,
.dbk-indeed-detail__body h3 {
    font-family: Poppins, sans-serif;
    font-size: 1rem;
    margin: 0 0 12px;
    font-weight: 700;
}

.dbk-indeed-detail__facts ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dbk-indeed-detail__facts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--dbk-indeed-text);
}

.dbk-indeed-detail__facts i {
    color: var(--dbk-indeed-teal);
    margin-top: 3px;
    width: 16px;
}

.dbk-indeed-detail__body h4 {
    font-size: 0.95rem;
    margin: 20px 0 8px;
    font-weight: 700;
}

.dbk-indeed-prose {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #444;
    white-space: pre-wrap;
}

.dbk-indeed-detail__note {
    margin-top: 24px;
    padding: 12px 14px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #0f766e;
}

.dbk-indeed-footnote {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px 20px;
    font-size: 0.8125rem;
    color: var(--dbk-indeed-muted);
    text-align: center;
}

.dbk-indeed-footnote a {
    color: var(--dbk-indeed-blue);
    font-weight: 600;
    text-decoration: none;
}

.dbk-indeed-footnote a:hover { text-decoration: underline; }

.dbk-indeed-empty {
    max-width: 480px;
    margin: 48px auto;
    text-align: center;
    padding: 32px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--dbk-indeed-border);
}

/* —— Apply modal —— */
.dbk-apply-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.dbk-apply-modal[hidden] { display: none; }

.dbk-apply-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.dbk-apply-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 14px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,.2);
}

.dbk-apply-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--dbk-indeed-muted);
}

.dbk-apply-modal__dialog h2 {
    font-family: Poppins, sans-serif;
    font-size: 1.2rem;
    margin: 0 0 4px;
    color: var(--dbk-indeed-blue);
}

.dbk-apply-modal__role {
    margin: 0 0 16px;
    font-size: 0.875rem;
    color: var(--dbk-indeed-muted);
    font-weight: 600;
}

.dbk-careers-form__field { margin-bottom: 12px; }

.dbk-careers-form__field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dbk-indeed-muted);
}

.dbk-careers-form__field input,
.dbk-careers-form__field textarea {
    width: 100%;
    border: 1px solid var(--dbk-indeed-border);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    box-sizing: border-box;
}

.dbk-careers-form__field input:focus,
.dbk-careers-form__field textarea:focus {
    outline: none;
    border-color: var(--dbk-indeed-blue);
    box-shadow: 0 0 0 3px rgba(26, 61, 109, 0.12);
}

.dbk-careers-form__foot { font-size: 0.75rem; color: var(--dbk-indeed-muted); margin-top: 10px; text-align: center; }

.dbk-careers-hp { position: absolute; left: -9999px; opacity: 0; }

.dbk-careers-alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.dbk-careers-alert--ok { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.dbk-careers-alert--err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* —— Mobile & tablet: single column stack —— */
@media (max-width: 899px) {
    .dbk-indeed-search {
        padding: 14px 12px 12px;
    }

    .dbk-indeed-search__title {
        font-size: 1.125rem;
    }

    .dbk-indeed-search__lead {
        font-size: 0.875rem;
        margin-bottom: 12px;
    }

    .dbk-indeed-search__bar {
        grid-template-columns: 1fr;
        padding: 8px;
    }

    .dbk-indeed-find-btn {
        width: 100%;
    }

    .dbk-indeed-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-top: 10px;
    }

    .dbk-indeed-filters__row,
    .dbk-indeed-filters__row--single {
        grid-template-columns: 1fr;
        max-width: none;
        width: 100%;
    }

    .dbk-indeed-filters__clear {
        align-self: flex-start;
        min-height: auto;
        padding: 2px 0;
    }

    .dbk-indeed-board {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        min-height: 0;
        border: none;
        width: 100%;
        max-width: 100%;
    }

    .dbk-indeed-list {
        border-right: none;
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
    }

    .dbk-indeed-list__scroll {
        max-height: none;
        overflow: visible;
    }

    .dbk-indeed-detail {
        width: 100%;
        min-width: 0;
        max-height: none;
        overflow: visible;
        border-top: 1px solid var(--dbk-indeed-border);
        flex: 0 0 auto;
    }

    .dbk-indeed-detail__header {
        position: static;
        margin: 0;
        padding: 16px 0 14px;
        box-shadow: none;
    }

    .dbk-indeed-detail__content {
        padding: 0 12px 20px;
    }

    .dbk-indeed-detail__title {
        font-size: 1.15rem;
    }

    .dbk-indeed-detail__actions {
        width: 100%;
    }

    .dbk-indeed-apply-btn {
        font-size: 0.875rem;
        padding: 12px 14px;
    }

    .dbk-indeed-item__btn {
        padding: 14px 12px;
    }

    .dbk-indeed-item__title {
        font-size: 0.9375rem;
    }

    .dbk-indeed-chip {
        font-size: 0.6875rem;
    }

    .dbk-indeed-footnote {
        padding: 10px 12px 16px;
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .dbk-indeed-search__bar {
        grid-template-columns: 1fr 1fr;
    }

    .dbk-indeed-find-btn {
        grid-column: 1 / -1;
    }
}

@media (min-width: 901px) {
    .dbk-indeed-board {
        min-height: calc(100vh - 240px);
    }
}

@media (min-width: 901px) and (max-width: 1199px) {
    .dbk-indeed-board {
        grid-template-columns: minmax(280px, 340px) 1fr;
    }
}

@media (min-width: 1200px) {
    .dbk-indeed-board {
        grid-template-columns: minmax(320px, 400px) 1fr;
    }

    .dbk-indeed-search__title {
        font-size: 1.375rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dbk-indeed-item__btn { transition: none; }
}
