/**
 * Announcement listing tab-row overflow fit.
 *
 * When `.job-container` / `.cc-ad-jobs-compose` has `is-cc-ad-tabs-icons`
 * (fitComposerTabs after the row overflows or Actions would clip), every
 * labeled tab-row control collapses to an icon — including Job Opportunity,
 * Company, Optional Fields, Position Roles, and Actions.
 *
 * When there is enough space (no icons class), the Actions primary keeps its
 * label and also shows the action-relevant icon beside it.
 */

/* Enough space: Actions shows primary icon + label (never clip the control). */
.job-right .job-tab .cc-ad-tab-actions,
.cc-ad-sheet .job-tab .cc-ad-tab-actions {
    flex: 0 0 auto;
    min-width: 0;
}

.job-right .job-tab .cc-ad-tab-actions .btn.dropdown-toggle,
.cc-ad-sheet .job-tab .cc-ad-tab-actions .btn.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    white-space: nowrap;
}

.job-right .job-tab .cc-ad-tab-actions .dropdown-toggle::before,
.cc-ad-sheet .job-tab .cc-ad-tab-actions .dropdown-toggle::before {
    content: "";
    display: block;
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 0.95rem;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h16v2H4V6zm0 5h16v2H4v-2zm0 5h16v2H4v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h16v2H4V6zm0 5h16v2H4v-2zm0 5h16v2H4v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Clear = solid waisted eraser (no felt stripe); long axis ~11 o'clock. */
.job-tab .cc-ad-tab-actions .is-cc-ad-actions-clear > .dropdown-toggle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='rotate(-135 12 12)'%3E%3Cpath fill='black' d='M6 5C8.8 7.2 15.2 7.2 18 5c1.5 0 2.7 1.2 2.7 2.8v8.4c0 1.6-1.2 2.8-2.7 2.8-2.8-2.2-9.2-2.2-12 0-1.5 0-2.7-1.2-2.7-2.8V7.8C3.3 6.2 4.5 5 6 5z'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='rotate(-135 12 12)'%3E%3Cpath fill='black' d='M6 5C8.8 7.2 15.2 7.2 18 5c1.5 0 2.7 1.2 2.7 2.8v8.4c0 1.6-1.2 2.8-2.7 2.8-2.8-2.2-9.2-2.2-12 0-1.5 0-2.7-1.2-2.7-2.8V7.8C3.3 6.2 4.5 5 6 5z'/%3E%3C/g%3E%3C/svg%3E");
}

.job-tab .cc-ad-tab-actions .is-cc-ad-actions-ready .dropdown-toggle::before,
.job-tab .cc-ad-tab-actions .is-cc-ad-actions-submit-blocked > .dropdown-toggle::before,
.job-tab .cc-ad-tab-actions [data-cc-pending-review-actions="submit"] .dropdown-toggle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}

.job-tab .cc-ad-tab-actions [data-cc-pending-review-actions="copy"] .dropdown-toggle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 8h10v12H8V8zm2-4h10v12h-2V6H10V4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 8h10v12H8V8zm2-4h10v12h-2V6H10V4z'/%3E%3C/svg%3E");
}

.job-tab .cc-ad-tab-actions [data-cc-pending-review-actions="expire"] .dropdown-toggle::before,
.job-tab .cc-ad-tab-actions [data-cc-pending-review-actions="pending"] .dropdown-toggle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 8.4 3.2 1.9-.9 1.5L11 13V7h2v5.4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 8.4 3.2 1.9-.9 1.5L11 13V7h2v5.4z'/%3E%3C/svg%3E");
}

.job-tab .cc-ad-tab-actions [data-cc-pending-review-actions="save"] .dropdown-toggle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 3h11l5 5v13H5V3zm2 2v14h12V9.2L15.8 6H7zm2 8h8v5H9v-5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 3h11l5 5v13H5V3zm2 2v14h12V9.2L15.8 6H7zm2 8h8v5H9v-5z'/%3E%3C/svg%3E");
}

.job-tab .cc-ad-tab-actions [data-cc-pending-review-actions="post"] .dropdown-toggle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 4l1 5h5l-4 3 1.5 5L14 14.5 10.5 17 12 12 8 9h5l1-5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 4l1 5h5l-4 3 1.5 5L14 14.5 10.5 17 12 12 8 9h5l1-5z'/%3E%3C/svg%3E");
}

/* Email primary: envelope (matches /img/postandemail.svg purpose). */
.job-tab .cc-ad-tab-actions [data-cc-pending-review-actions="post_and_email"] .dropdown-toggle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

/* Orange Email / Submit keeps a light glyph on the gradient. */
.job-tab .cc-ad-tab-actions .btn-orange-gradient.dropdown-toggle::before,
.job-tab .cc-ad-tab-actions .is-cc-ad-actions-ready > .dropdown-toggle.btn-orange-gradient::before,
.job-tab .cc-ad-tab-actions [data-cc-pending-review-actions="post_and_email"] > .dropdown-toggle.btn-orange-gradient::before,
.job-tab .cc-ad-tab-actions [data-cc-pending-review-actions="submit"] > .dropdown-toggle.btn-orange-gradient::before {
    background-color: #ffffff !important;
}

/*
 * Not enough space: every labeled tab-row item becomes an icon
 * (desktop overflow fit + shared with mobile class from fitComposerTabs).
 */
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab #job-tab,
.job-container.is-cc-ad-tabs-icons .job-tab #job-tab,
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab #company-tab,
.job-container.is-cc-ad-tabs-icons .job-tab #company-tab,
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-fields-tab .nav-link,
.job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-fields-tab .nav-link,
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-position-roles-tab .nav-link,
.job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-position-roles-tab .nav-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 2rem;
    max-width: 2.4rem;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    font-size: 0 !important;
    color: transparent !important;
}

.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab #job-tab .cc-ad-listing-tab-label,
.job-container.is-cc-ad-tabs-icons .job-tab #job-tab .cc-ad-listing-tab-label,
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab #company-tab .cc-ad-listing-tab-label,
.job-container.is-cc-ad-tabs-icons .job-tab #company-tab .cc-ad-listing-tab-label,
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-fields-tab .cc-ad-composer-tab-label,
.job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-fields-tab .cc-ad-composer-tab-label,
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-position-roles-tab .cc-ad-composer-tab-label,
.job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-position-roles-tab .cc-ad-composer-tab-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    font-size: 0 !important;
}

.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab #job-tab .cc-ad-tab-type-icon,
.job-container.is-cc-ad-tabs-icons .job-tab #job-tab .cc-ad-tab-type-icon,
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab #company-tab .cc-ad-tab-company-icon,
.job-container.is-cc-ad-tabs-icons .job-tab #company-tab .cc-ad-tab-company-icon,
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-fields-tab .cc-ad-composer-tab-icon,
.job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-fields-tab .cc-ad-composer-tab-icon,
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-position-roles-tab .cc-ad-composer-tab-icon,
.job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-position-roles-tab .cc-ad-composer-tab-icon {
    display: block !important;
    width: 1.15rem !important;
    height: 1.15rem !important;
    flex: 0 0 1.15rem !important;
    color: var(--cc-theme-light-primary, #006db7) !important;
}

html[data-theme="dark"] .cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab #job-tab .cc-ad-tab-type-icon,
html[data-theme="dark"] .job-container.is-cc-ad-tabs-icons .job-tab #job-tab .cc-ad-tab-type-icon,
html[data-theme="dark"] .cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab #company-tab .cc-ad-tab-company-icon,
html[data-theme="dark"] .job-container.is-cc-ad-tabs-icons .job-tab #company-tab .cc-ad-tab-company-icon,
html[data-theme="dark"] .cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-composer-tab-icon,
html[data-theme="dark"] .job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-composer-tab-icon {
    color: #9ec9ef !important;
}

/* Icon-only Actions when the row is in overflow icon mode. */
.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-tab-actions .btn.dropdown-toggle,
.job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-tab-actions .btn.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 1.15rem !important;
    min-width: 1.15rem !important;
    max-width: 1.15rem !important;
    height: 1.15rem !important;
    min-height: 1.15rem !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none;
    font-size: 0 !important;
    line-height: 0;
    color: transparent !important;
}

.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-tab-actions .dropdown-toggle::after,
.job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-tab-actions .dropdown-toggle::after {
    display: none;
}

.cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-tab-actions .dropdown-toggle::before,
.job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-tab-actions .dropdown-toggle::before {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
    background-color: var(--cc-theme-light-primary, #006db7) !important;
}

html[data-theme="dark"] .cc-ad-jobs-compose.is-cc-ad-tabs-icons .job-tab .cc-ad-tab-actions .dropdown-toggle::before,
html[data-theme="dark"] .job-container.is-cc-ad-tabs-icons .job-tab .cc-ad-tab-actions .dropdown-toggle::before {
    background-color: #9ec9ef !important;
}
