/*
 * Notification bell and list.
 *
 * Standalone for the same reason as featured.css and ads.css: the theme's Vite
 * build is not runnable in this checkout, so an SCSS change would never reach
 * the page.
 */

.jb-notification-bell > .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: inherit;
}

.jb-notification-bell > .dropdown-toggle::after {
    display: none; /* no caret next to an icon-only button */
}

.jb-notification-count {
    position: absolute;
    top: -2px;
    /* Logical property so the badge flips with the layout under RTL. */
    inset-inline-end: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e5484d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.jb-notification-menu {
    width: 340px;
    max-width: calc(100vw - 24px);
    padding: 0;
    overflow: hidden;
}

.jb-notification-menu .dropdown-header {
    padding: 12px 16px;
    font-weight: 600;
}

.jb-notification-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 16px;
    /* Long titles must wrap rather than stretch the dropdown. */
    white-space: normal;
}

.jb-notification-item--unread {
    background: rgba(60, 193, 154, 0.08);
}

.jb-notification-item i {
    margin-top: 3px;
    flex: 0 0 auto;
}

.jb-notification-text {
    font-size: 13px;
    line-height: 1.4;
}

/* The full account notifications pages. */
.account-notifications__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.account-notifications__subtitle {
    max-width: 680px;
    margin-bottom: 0;
    color: #667085;
    font-size: 16px;
    line-height: 1.6;
}

.account-notifications__secondary-action,
.account-notifications__mark-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid #e7ecf1;
    border-radius: 6px;
    background: #fff;
    color: #4f5f73;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.account-notifications__secondary-action:hover,
.account-notifications__mark-read:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.account-notifications__secondary-action i,
.account-notifications__mark-read i {
    font-size: 17px;
    line-height: 1;
}

.account-notifications__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.account-notifications__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-notifications__filter {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid #e7ecf1;
    border-radius: 6px;
    background: #fff;
    color: #4f5f73;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: all 0.3s ease;
}

.account-notifications__filter:hover,
.account-notifications__filter.is-active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.jb-notification-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 22px 24px;
    border: 1px solid #e7ecf1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.jb-notification-row--unread {
    border-inline-start: 4px solid var(--primary-color);
    background: linear-gradient(90deg, rgba(60, 193, 154, 0.08), #fff 42%);
}

.jb-notification-row__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(25, 103, 210, 0.08);
    color: var(--primary-color);
    font-size: 20px;
}

.jb-notification-row__title {
    display: inline-flex;
    margin-bottom: 4px;
    color: #171d28;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.jb-notification-row__title:hover {
    color: var(--primary-color);
}

.jb-notification-row__body,
.jb-notification-row__time {
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
}

.jb-notification-row__time {
    margin-top: 4px;
}

.jb-notification-row__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e7ecf1;
    border-radius: 50%;
    background: #fff;
    color: #98a2b3;
    transition: all 0.3s ease;
}

.jb-notification-row__delete:hover {
    border-color: #f4c7c7;
    background: #fff5f5;
    color: #d92d20;
}

.account-notifications__empty {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px;
    border: 1px dashed #d7e0ea;
    border-radius: 10px;
    background: #f9fcff;
    color: #4f5f73;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.account-notifications__empty-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(25, 103, 210, 0.08);
    color: var(--primary-color);
    font-size: 20px;
}

.account-notification-preferences__table {
    margin-bottom: 24px;
    border: 1px solid #e7ecf1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.account-notification-preferences__table table {
    margin-bottom: 0;
}

.account-notification-preferences__table thead th {
    border-bottom: 1px solid #e7ecf1;
    background: #f9fcff;
    color: #4f5f73;
    font-size: 14px;
    font-weight: 700;
}

.account-notification-preferences__table tbody td {
    padding: 18px 16px;
    border-color: #edf1f5;
}

.account-notification-preferences__event {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #171d28;
    font-size: 15px;
    font-weight: 600;
}

.account-notification-preferences__event i {
    color: var(--primary-color);
    font-size: 17px;
}

.account-notification-preferences__description {
    margin-top: 4px;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
}

.account-notifications__save-button {
    min-height: 44px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
}

@media (max-width: 767px) {
    .account-notifications__header,
    .account-notifications__toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-notifications__secondary-action,
    .account-notifications__mark-read,
    .account-notifications__toolbar form,
    .account-notifications__filters {
        width: 100%;
    }

    .account-notifications__filter {
        flex: 1 1 calc(50% - 10px);
        justify-content: center;
        padding-right: 12px;
        padding-left: 12px;
        text-align: center;
    }

    .jb-notification-row {
        padding: 18px;
    }

    .account-notification-preferences__table tbody td {
        min-width: 120px;
    }
}

/*
 * Language toggle in the header.
 *
 * Sized to sit in the same row as "Post a job" and "Sign in" rather than
 * beside them: those are 44px tall with a 10px radius and 16px text, and the
 * first attempt at this control was 32px tall with 14px text, so it floated
 * above the line instead of sharing it.
 *
 * Styled as the quiet member of that row - a bordered outline rather than a
 * filled button - because changing language should be findable without
 * competing with the primary calls to action next to it.
 */
.jb-language-cell {
    /* The sibling buttons sit at the top of this 52px flex row rather than its
       centre, so match that instead of centring. */
    align-items: flex-start;
    margin-inline-end: 10px;
}

.jb-language-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 10px;
    background: transparent;
    color: #3cc19a;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;

    /* Height is derived, not declared. The sibling buttons are 43.1875px tall
       because that is 8px padding either side of a 27.2px line box, and a
       hard-coded 44px only happened to look close. Matching the inputs instead
       of the output keeps them identical at any font size or breakpoint. */
    padding: 8px 15px;
    font-size: 12px;
    line-height: 1.7;

    /* An inset shadow rather than a border: a border would add 2px to the box
       and put the height back out by exactly the amount being fixed here. */
    box-shadow: inset 0 0 0 1px rgba(60, 193, 154, 0.35);
}

.jb-language-toggle:hover,
.jb-language-toggle:focus-visible {
    background: #3cc19a;
    box-shadow: inset 0 0 0 1px #3cc19a;
    color: #fff;
    text-decoration: none;
}

/* Keyboard users need to see where they are. */
.jb-language-toggle:focus-visible {
    outline: 2px solid #16283f;
    outline-offset: 2px;
}

.jb-language-toggle i {
    font-size: 17px;
    line-height: 1;
}

/* Icon-only below the widest breakpoint, where the row gets tight. */
@media (max-width: 1199.98px) {
    .jb-language-toggle span:not(.caret) {
        display: none;
    }

    .jb-language-toggle {
        padding: 8px 12px;
    }
}

/* Three or more languages fall back to a dropdown; drop Bootstrap's caret so
   the control keeps the same silhouette as the toggle. */
.jb-language-cell .dropdown-toggle::after {
    display: none;
}

.jb-language-cell .dropdown-menu {
    min-width: 170px;
}

.jb-language-cell .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Inside the off-canvas drawer the row is dark and full width. */
.jb-language-toggle--drawer {
    width: 100%;
    justify-content: flex-start;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    color: #fff;
}

.jb-language-toggle--drawer span:not(.caret) {
    display: inline;
}
