/* Public job details only; keep panel and listing styles independent. */
.job-detail { --job-border: #e1e7ee; }

/* Header and section cards. Important rules override Bootstrap utilities. */
.job-detail .job-detail-header { border-inline-start: 4px solid #427b91 !important; }
.job-detail .job-detail-header h1 { color: #172b45; font-size: 18px; line-height: 1.8; min-width: 0; overflow-wrap: anywhere; }
.job-detail :is(#contacts, #description, #comments, #faq, #tags) {
    border: 1px solid var(--job-border) !important;
    border-radius: 1rem !important;
    background: #fff;
    box-shadow: 0 3px 16px #172b4506 !important;
    scroll-margin-top: 6rem;
}
.job-detail .job-detail-logo { width: 144px; height: 144px; object-fit: contain; background: #fff; }
.job-detail .job-detail-phones { min-width: 0; }

/* Expired page notices. */
.job-detail .job-expiry-notice { color: #343a40; background: #fffaf0; border: 1px solid #e9d9b7; border-inline-start: 4px solid #c39947; font-size: 16px; line-height: 2; }
.job-detail .job-expiry-notice-danger { background: #fbe2e2; border-color: #efd5d1; border-inline-start-color: #bd7770; }
.job-detail .job-expiry-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: .65rem; background: #00000006; }
.job-detail .job-expiry-content { min-width: 0; overflow-wrap: anywhere; }
.job-detail .job-expiry-title { color: #654817; font-size: 18px; font-weight: 700; line-height: 1.8; }
.job-detail .job-expiry-notice-danger .job-expiry-title { color: #842f2f; }
.job-detail .job-expiry-action { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; padding: 5px 14px; border-radius: .65rem; font-size: 16px; font-weight: 600; }

/* Phone links: keep their sizing independent from social actions. */
.job-detail .job-detail-phones a[href^="tel:"] {
    min-height: 40px;
    padding: 6px 10px !important;
    font-size: 16px !important;
    line-height: 24px;
    vertical-align: middle;
    margin-block: .125rem;
    border: 1px solid #d8e6ee;
    border-radius: .65rem;
    background: #f0f7fa;
    color: #195875 !important;
    direction: ltr;
    font-weight: 600;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.job-detail .job-detail-phones a[href^="tel:"]:hover { background: #e2f0f5; border-color: #7fa9bd; }

/* Social actions. */
.job-detail #socials { border: 0 !important; border-top: 1px solid var(--job-border) !important; padding: .5rem 0 0 !important; margin: .5rem 0 0 !important; }
.job-detail #socials .btn {
    padding: 3px 7px !important;
    font-size: 15px !important;
    line-height: 24px;
    vertical-align: middle;
    border-radius: .65rem;
    margin-bottom: .25rem;
}

/* Management actions. */
.job-detail .job-admin-actions { border-color: var(--job-border) !important; }
.job-detail .job-admin-actions .btn { display: inline-flex; align-items: center; gap: .25rem; font-size: 15px; padding: 3px 7px; border-radius: .65rem; }
.job-detail .job-admin-actions .badge { font-size: 13px; }
.job-detail .job-admin-menu { min-width: 13rem; max-width: calc(100vw - 2rem); max-height: min(70vh, 28rem); overflow-y: auto; overscroll-behavior: contain; }
.job-detail .job-admin-menu .dropdown-item { display: flex; align-items: center; gap: .5rem; min-height: 36px; padding: .4rem .65rem; border-radius: .4rem; font-size: 15px; }
.job-detail .job-admin-menu .dropdown-item > i { flex: 0 0 1rem; text-align: center; }
.job-detail .job-admin-menu .badge { margin-inline-start: auto; }

/* Discount offer. */
.job-detail .job-discount { border-color: var(--job-border) !important; }
.job-detail .job-discount-header { background: #f0f5f9; border-radius: 1rem 1rem 0 0; }
.job-detail .job-discount-header .job-discount-title { min-width: 0; font-size: 16px; }
.job-detail .job-discount-header:has(+ .d-none) { border-radius: 1rem; }
.job-detail .job-discount-title { font-size: 15px; line-height: 1.8; }
.job-detail .job-discount-percent { font-size: 18px; white-space: nowrap; }
.job-detail .job-discount-details { font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
.job-detail .job-discount-button { font-size: 15px; padding: 3px 7px; border-radius: .65rem; }

/* Addresses, description, questions and comments. */
.job-detail #addresses > div { background: #fff; border-color: var(--job-border) !important; border-radius: .85rem !important; padding: .5rem .75rem !important; line-height: 1.8; }
.job-detail #addresses .badge { background: #eef4f8 !important; color: #284b63; margin-inline-end: .4rem; }
.job-detail #description { line-height: 1.9; overflow-wrap: anywhere; }
.job-detail #description img { max-width: 100%; height: auto; }
.job-detail #faq > .card-header { background: #f0f5f9 !important; color: #24344b; padding: .5rem .75rem; border-radius: 1rem 1rem 0 0; border-bottom-color: var(--job-border); font-size: 16px; font-weight: 600; line-height: 1.8; }
.job-detail #faq .accordion-button { line-height: 1.9; }
.job-detail #faq .accordion-button:not(.collapsed) { background: #eef3f8; color: #2d4d6c; }
.job-detail #faq .accordion-body { color: #34465c; }
.job-detail #comments { padding: .75rem !important; margin-top: .75rem !important; }

/* Public service links. */
.job-detail .job-services-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: .75rem; background: #e8f0fc; color: #3969a5; }
.job-detail .job-services-title { color: #305781; font-size: 16px; font-weight: 600; line-height: 1.8; }
.job-detail .job-service-item { max-width: 100%; min-width: 0; }
.job-detail .job-service-link { display: inline-flex; align-items: center; gap: .375rem; max-width: 100%; min-height: 32px; padding: .125rem .5rem; border: 1px solid #d5e2f2; border-radius: .65rem; background: #f2f6fc; color: #365b87; font-size: 14px; line-height: 1.8; text-decoration: none; }
.job-detail .job-service-link span { min-width: 0; overflow-wrap: anywhere; }
.job-detail .job-service-link i { color: #4a78b1; font-size: 12px; }
.job-detail .job-service-link:hover { background: #e4edfa; border-color: #8fafd6; color: #254e80; }
.job-detail .job-service-link:focus-visible { outline: 3px solid #3969a5; outline-offset: 3px; }

/* Public comments and their submission form. */
.job-detail #comments > header { background: linear-gradient(110deg, #f8fbfc, #e9f5f3); border-bottom: 0 !important; border-radius: .75rem; padding: .65rem .75rem !important; }
.job-detail .job-comments-title { color: #245d62; font-size: 16px; font-weight: 600; line-height: 1.8; }
.job-detail .job-comments-title > i { color: #28877e; }
.job-detail .job-comments-count { background: #fff; color: #286c65; border: 1px solid #cce5df; padding: .2rem .55rem; border-radius: .5rem; font-size: 14px; }
.job-detail .job-comment-form { background: #eef8f5; border: 1px solid #bfded5; border-inline-start: 3px solid #40988a; }
.job-detail .job-comment-form .form-label { color: #34465c; font-size: 16px; }
.job-detail .job-comment-form .form-control { border-color: #d7dfe8; border-radius: .65rem; font-size: 16px; line-height: 1.8; }
.job-detail .job-comment-form .form-control:focus { border-color: #40988a; box-shadow: 0 0 0 .2rem rgb(40 125 116 / 15%); }
.job-detail .job-comment-form textarea { min-height: 100px; resize: vertical; }
.job-detail .job-comment-form .btn { --bs-btn-color: #fff; --bs-btn-bg: #287d74; --bs-btn-border-color: #287d74; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #20675f; --bs-btn-hover-border-color: #20675f; --bs-btn-active-color: #fff; --bs-btn-active-bg: #19574f; --bs-btn-active-border-color: #19574f; --bs-btn-focus-shadow-rgb: 40, 125, 116; min-height: 40px; border-radius: .65rem; font-size: 16px; }
.job-detail .job-comment { padding: .85rem; border: 1px solid var(--job-border); border-radius: .85rem; background: #fff; box-shadow: 0 3px 10px #24344b06; }
.job-detail .job-comment + .job-comment { margin-top: .75rem; }
.job-detail .job-comment-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #cce5df; border-radius: 50%; background: #e8f5f1; color: #287d74; }
.job-detail .job-comment-meta { min-width: 0; }
.job-detail .job-comment-name { color: #24344b; font-size: 16px; font-weight: 600; line-height: 1.8; overflow-wrap: anywhere; }
.job-detail .job-comment-date { color: #6b7785; font-size: 14px; direction: ltr; white-space: nowrap; }
.job-detail .job-comment-text { color: #34465c; font-size: 15px; line-height: 2; white-space: pre-line; overflow-wrap: anywhere; }
.job-detail .job-comment-answer { background: #eef7f3; border-inline-start: 3px solid #56a38a; border-radius: .65rem; padding: .65rem .8rem; margin-inline-start: 1rem; }
.job-detail .job-comment-answer-title { color: #276b57; font-size: 14px; font-weight: 600; line-height: 1.8; overflow-wrap: anywhere; }

/* Photos and clips. */
.job-detail .job-media { border-color: var(--job-border) !important; }
.job-detail .job-media-title { font-size: 16px; font-weight: 600; line-height: 1.8; }
.job-detail .job-media-title .badge { font-size: 13px; }
.job-detail .job-photo-strip { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem; }
.job-detail .job-photo-thumb { position: relative; flex: 0 0 104px; border: 1px solid var(--job-border); border-radius: .65rem; overflow: hidden; }
.job-detail .job-photo-thumb img { display: block; width: 104px; height: 104px; object-fit: cover; }
.job-detail .job-photo-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #172b45b3; color: white; font-size: 20px; direction: ltr; }
.job-detail .job-clip-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.job-detail #moreClips:not(.d-none) { display: contents; }
.job-detail .job-clip { width: min(100%, 280px); aspect-ratio: 16 / 9; object-fit: contain; background: #172b45; border-radius: .65rem; }
.job-detail .job-media-toggle { font-size: 15px; padding: 3px 7px; border-radius: .65rem; }

@media (max-width: 575.98px) {
    .job-detail .job-detail-logo { width: 104px; height: 104px; }
    .job-detail .job-discount-header .job-discount-title { font-size: 15px; }
    .job-detail .job-discount-header .job-discount-button { font-size: 14px; }
}

/* Subgroup action and related jobs. */
.job-detail .job-add-subgroup { display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: .5rem 1rem; border: 1px solid #19a9c3; border-radius: .75rem; background: #16b8d2; color: #fff; font-size: 16px; line-height: 1.8; text-align: center; text-decoration: none; transition: background-color .2s, border-color .2s, transform .2s; }
.job-detail .job-add-subgroup:hover { border-color: #078da6; background: #0fa5bd; color: #fff; transform: translateY(-1px); }
.job-detail .job-add-subgroup-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #ffffff33; }
.job-detail .job-similar { overflow: hidden; border: 1px solid #dfe7ee; border-radius: 1rem; background: #fff; box-shadow: 0 5px 20px #172b4510; }
.job-detail .job-similar-header { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; background: #f4f8fb; border-bottom: 1px solid #e3eaf0; }
.job-detail .job-similar-header h5 { margin: 0; color: #243b53; font-size: 17px; font-weight: 600; line-height: 1.8; }
.job-detail .job-similar-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: .65rem; background: #dff5f8; color: #087990; }
.job-detail .job-similar-list { padding: .35rem .75rem; }
.job-detail .job-similar-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-width: 0; padding: .6rem .35rem; border-bottom: 1px solid #edf1f4; color: #365b76; text-decoration: none; }
.job-detail .job-similar-item:last-child { border-bottom: 0; }
.job-detail .job-similar-item:hover { color: #087990; background: #f6fbfc; }
.job-detail .job-similar-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.8; }
.job-detail .job-similar-item .badge { flex: 0 0 auto; background: #e8f7fa; color: #087990; font-weight: 500; }
.job-detail .job-similar-more { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: .6rem .75rem .75rem; min-height: 40px; border-radius: .65rem; background: #eef8fa; color: #087990; font-size: 15px; font-weight: 600; text-decoration: none; }
.job-detail .job-similar-more:hover { background: #dff3f7; color: #055160; }

@media (max-width: 575.98px) {
    .job-detail .job-similar-item { align-items: flex-start; }
    .job-detail .job-similar-item .badge { margin-top: .15rem; }
}
