/**
 * Single LOB Offering Detail Page Styles
 * Pixel-perfect implementation
 */

/* Hide WordPress's automatically rendered post title and featured image */
body:has(.lob-offering-detail) .wp-block-post-title {
    display: none;
}

body:has(.lob-offering-detail) .wp-block-post-featured-image {
    display: none;
}

/* Hide "Written by" pattern */
body:has(.lob-offering-detail) .wp-block-group.has-accent-4-color {
    display: none;
}

/* Reduce margin/padding from main content wrapper */
body:has(.lob-offering-detail) main.wp-block-group {
    margin-top: 0 !important;
}

body:has(.lob-offering-detail) .wp-block-group.alignfull {
    padding-top: 0px !important;
    /* padding-bottom: 5px !important; */
}

/* Main Container */
.lob-offering-detail {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: var(--wp--style--global--wide-size, 1340px);
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .lob-offering-detail {
        padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--50);
    }
}

@media (max-width: 768px) {
    .lob-offering-detail {
        padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
    }
}

/* Back Navigation - moved to custom.css */

/* Layout */
.lob-offering-layout {
    display: grid;
    grid-template-columns: 1fr 374px;
    gap: 31px;
    align-items: start;
    padding-bottom: 32px;
}

/* Main Content Card */
.lob-offering-main-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    min-width: 0;
}

.lob-offering-main {
    min-width: 0;
}

/* Featured Image */
.lob-offering-image {
    position: relative;
    width: 100%;
    margin-bottom: 32px;
    border-radius: 8px;
    overflow: hidden;
    margin-left: -24px;
    margin-right: -24px;
    margin-top: -24px;
    width: calc(100% + 48px);
}

.lob-offering-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Title Action Buttons */
.lob-favorite-btn,
.lob-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.lob-favorite-btn:hover,
.lob-share-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lob-favorite-btn svg,
.lob-share-btn svg {
    width: 24px;
    height: 24px;
    color: #333333;
    stroke: currentColor;
}

.lob-favorite-btn:hover svg,
.lob-share-btn:hover svg {
    color: #000000;
}

.lob-favorite-btn.active svg {
    color: #ee0015;
    fill: #ee0015;
}

.lob-favorite-btn.active svg path {
    fill: #ee0015 !important;
    stroke: #ee0015;
}

/* Type Badge */
.lob-type-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #ee0015;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    z-index: 10;
}

/* Header Section */
.lob-offering-header {
    margin-bottom: 32px;
}

.lob-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.lob-title-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.lob-offering-header h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #000000;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    flex: 1;
}

.lob-provider {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 400;
    color: #666666;
    margin: 0;
    line-height: 1.5;
}

.lob-provider svg {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    color: #999999;
    flex-shrink: 0;
}

.lob-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.lob-status-badge.lob-status-publish {
    background: #00c8b0;
    color: #ffffff;
    border-color: #00c8b0;
}

.lob-status-badge.lob-status-pending {
    background: #f0ad4e;
    color: #ffffff;
    border-color: #f0ad4e;
}

.lob-status-badge.lob-status-approved {
    background: #4a5568;
    color: #ffffff;
    border-color: #4a5568;
}

.lob-status-badge.lob-status-rejected {
    background: #d9534f;
    color: #ffffff;
    border-color: #d9534f;
}

.lob-status-badge.lob-status-draft {
    background: #999999;
    color: #ffffff;
    border-color: #999999;
}

/* Description Section */
.lob-offering-description {
    margin-bottom: 40px;
}

.lob-offering-description h2 {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 16px 0;
    font-family: 'Poppins', sans-serif;
}

.lob-offering-description p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #333333;
    margin: 0 0 16px 0;
}

.lob-offering-description p:last-child {
    margin-bottom: 0;
}

/* Categories Section */
.lob-offering-categories {
    margin-bottom: 40px;
}

.lob-offering-categories h2 {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 16px 0;
    font-family: 'Poppins', sans-serif;
}

.lob-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lob-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: #f3f3f5;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #000000;
    line-height: 1.4;
    margin-top: 4px;
    white-space: nowrap;
}

.lob-tag-red {
    background: #ee0015;
    color: #ffffff;
    border: none;
    font-family: var(--font-sans) !important;
}

/* Contact Details */
.lob-contact-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.lob-contact-detail-item {
    display: flex;
    align-items: center;
}

.lob-contact-detail-item svg {
    width: 20px;
    height: 20px;
    color: #00c8b0;
    margin-right: 12px;
    flex-shrink: 0;
}

.lob-contact-link {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    text-decoration: none;
    line-height: 1.5;
    word-break: break-all;
}

.lob-contact-link:hover {
    text-decoration: underline;
}

/* Sidebar */
.lob-offering-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Info Sections */
.lob-info-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* padding-top: 21px; */
}

.lob-info-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 0 0;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0;
}

h3 {}

.lob-detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;
}

.lob-detail-item:last-child {
    margin-bottom: 0;
}

.lob-detail-item svg {
    width: 20px;
    height: 20px;
    color: #fc792c;
    margin-right: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.lob-detail-label {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    margin: 0 0 0 0;
    line-height: 1.5;
    text-transform: none;
}

.lob-detail-text {
    font-size: 16px;
    font-weight: 400;
    color: #000000;
    margin: 0;
    line-height: 1.5;
}

.lob-detail-text .lob-tag {
    display: inline-flex;
    margin: 0;
}

.lob-detail-item>div {
    display: flex;
    flex-direction: column;
}

/* Availability Badge (Detail Page) */
.lob-offering-availability-detail {
    margin-top: -3px;
    margin-bottom: -3px;
}

.lob-detail-item .lob-offering-availability-text {
    font-weight: 500;
    color: var(--color-primary, #00c8b0);
    padding: 2px 7px;
    /* background: #f3f4f6; */
    border-radius: 8px;
    font-size: 12px;
    /* color: #374151; */
    display: inline-flex;
    align-items: center;
    gap: 0px;
    border: 1px solid var(--color-primary, #00c8b0);
}

/* Job Guarantee */
.lob-job-guarantee {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.lob-job-guarantee-text {
    font-size: 14px;
    font-weight: 400;
    color: #166534;
    margin: 0;
    line-height: 1.5;
}

/* Additional Info Box */
.lob-additional-info-box {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 8px;
    padding: 16px;
    margin: 32px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 0;
}

.lob-additional-info-box svg {
    width: 20px;
    height: 20px;
    color: #1890ff;
    flex-shrink: 0;
    margin-top: 2px;
}

.lob-additional-info-box p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #000000;
}

/* Requirements Box */
.lob-requirements-box {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    padding: 16px;
    margin: 32px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 0;
}

.lob-requirements-box svg {
    width: 20px;
    height: 20px;
    color: #faad14;
    flex-shrink: 0;
    margin-top: 2px;
}

.lob-requirements-box div {
    flex: 1;
}

.lob-requirements-box strong {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin-bottom: 8px;
    font-family: var(--font-sans) !important;
    margin-bottom: 4px !important;
}

.lob-requirements-box p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #000000;
}

/* Action Buttons */
.lob-offering-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.lob-btn {
    width: 100%;
    padding: 12px 24px;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
    /* cursor: pointer; */
    transition: all 0.2s;
    background: #ffffff;
    color: #000000;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lob-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.lob-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.lob-btn-primary {
    background: #00c8b0;
    border-color: #00c8b0;
    font-weight: 500;
    cursor: default;
}

.lob-btn-primary:hover {
    background: #00c8b0e6;
}

.lob-btn-primary svg {
    color: #ffffff;
}

.lob-btn-favorite {
    background: #ffffff;
    color: #000000;
    border-color: #a1a1a180 !important;
    font-weight: 500;
}

.lob-btn-favorite:hover {
    background: #e9ebef;
}

.lob-btn-favorite.active {
    background: #ffffff;
    color: #ee0015;
    border-color: #ee0015 !important;
}

.lob-btn-favorite.active svg {
    color: #ee0015;
    fill: #ee0015;
}

.lob-btn-secondary {
    background: #ffffff;
    color: #000000;
}

.lob-btn {
    font-weight: bold;
}

.lob-btn svg {
    margin-right: 4px;
}

.lob-btn-primary {
    /* color: black; */
    /* font-size: 14px; */
}

.lob-btn-primary svg {
    color: black;
}

/* ##css_overrides_start */
/**
 * Custom overrides for single LOB offering page
 * This file is loaded after single-offering.css to allow overrides
 */

p.lob-provider {
    font-size: 20px;
    color: #4a5565eb;
    font-size: 16px;
}

p.lob-provider svg {
    color: #4a5565eb;
    width: 20px;
    height: 18px;
    margin-right: 7px;
    margin-top: -2px;
}

span.lob-status-badge {
    display: none !important;
}

/* .lob-back-nav styles moved to custom.css */

span.lob-type-badge {
    background: rgba(255, 255, 255, 1);
    color: black;
    font-size: 13px;
    padding: 3px 12px;
    top: 25px;
}

.lob-title-actions .lob-favorite-btn,
.lob-title-actions .lob-share-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
}

.lob-title-actions .lob-favorite-btn svg,
.lob-title-actions .lob-share-btn svg {
    width: 24px;
    height: 24px;
}



/* .lob-back-nav a svg styles moved to custom.css */

.lob-offering-header {
    margin-top: 48px;
}

.lob-title-actions button svg {
    color: #99a1af !important;
    width: 18px !important;
    height: 18px !important;
}

.lob-title-actions .lob-favorite-btn.active svg {
    color: #ee0015 !important;
    fill: #ee0015 !important;
}

.lob-title-actions .lob-favorite-btn.active svg path {
    fill: #ee0015 !important;
    stroke: #ee0015 !important;
}

.lob-title-actions button {
    border-radius: 0;
    transition: all 0.3s ease-in-out;
}

.lob-title-actions button:hover {
    /* background: red !important; */
    background: #99a1af2b;
}

.lob-title-actions {
    gap: 7px;
}

/* button.lob-share-btn:hover {
    background: #99a1af2b;
} */

/* button.lob-share-btn {
    border-radius: 0;
} */

.lob-offering-header h1 {
    font-size: 30px;
    font-weight: 500;
}

.lob-title-row {
    margin-bottom: 7px;
}

.lob-offering-description h2 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 11px;
}

.lob-offering-description p:last-child {
    color: #4a5565eb;
}

.lob-offering-description {
    margin-bottom: 12px;
}

.lob-requirements-box {
    margin-top: 0;
    border-radius: 0;
    border-left: 5px solid #ffb900;
}

.lob-offering-main-card {
    border-radius: 18px;
    padding-bottom: 5px;
    overflow: hidden;
}

.lob-info-section h3 {
    font-size: 16px;
    font-weight: 700;
    /* margin: 9px 0; */
    /* margin-top: 3px; */
}

.lob-additional-info-box {
    margin-top: 0;
    border-radius: 0;
    border-left: 5px solid #51a2ff;
    background: #eff6ff;
}

.lob-additional-info-box p,
.lob-requirements-box p {
    font-size: 14px;
    color: #000000cc;
}

.lob-additional-info-box strong {
    font-weight: 500;
}

.lob-detail-item svg {
    width: 20px;
    height: 20px;
    margin-top: 3px;
}

p.lob-detail-label {
    color: #6a7282;
}

.main-sidebar-item svg {
    color: #ee0015;
}

.lob-offering-image {
    border-radius: 0;
}

.lob-contact-details {
    margin-top: 12px;
    margin-bottom: 0;
}

.lob-info-section {
    border-radius: 18px;
}

/* Add to Planning Modal Styles */
/* Modal Overlay */
.lob-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lob-dialog-overlay.show {
    display: flex;
    max-width: 100%;
}

/* Dialog */
.lob-dialog {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: var(--container-md);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .15);
    animation: lob-dialog-in .2s ease;
}

/* Header */
.lob-dialog-header h2 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: var(--font-poppins);
}

.lob-dialog-header p {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 14px;
    /* color: #717182; */
    color: var(--muted-foreground);
}

/* Close */
.lob-dialog-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: 0;
    font-size: 22px;
    /* cursor: pointer; */
    opacity: .6;
}

.lob-dialog-close:hover {
    opacity: 1;
}

/* Body */
.lob-dialog-body {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-family: var(--font-sans);
}

.lob-dialog-body * {
    font-family: var(--font-sans);
}

.lob-dialog-body .lob-btn-primary,
.lob-dialog-body .lob-btn-link {
    font-family: var(--font-poppins);
}

/* Fields */
.lob-field label {
    font-size: 14px;
    font-weight: 500;
    display: block;
    color: var(--color-black);
    font-family: var(--font-sans);
}

.lob-field input {
    width: 100%;
    /* height: 24px; */
    border-radius: 6px;
    border: 1px solid transparent;
    background: #f3f3f5;
    font-size: 14px;
    padding: 8px 12px;
    box-sizing: border-box;
}

.lob-field input:focus {
    outline: 1px solid #a1a1a1;
    border-color: #a1a1a1;
    box-shadow: 0 0 0 4px #a1a1a180;
}

.lob-field input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
}

.lob-field input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.lob-field input[type="date"]::-webkit-inner-spin-button {
    display: none;
}

#offering_search,
#edit_offering_search {
    padding-left: 33px;
}

.lob-input-icon {
    position: relative;
}

.lob-input-icon svg {
    position: absolute;
    left: 10px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    stroke: #9ca3af;
    fill: none;
}

/* Offerings list */
.lob-offerings-list {
    margin-top: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-height: 247px;
    overflow-y: auto;
}

.lob-offering {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
}

.lob-offering:last-child {
    border-bottom: 0;
}

.lob-offering:hover {
    background: #f9fafb;
}

.lob-offering.active,
.lob-offering.selected {
    background: rgba(0, 200, 176, .1);
    border-left: 4px solid #00c8b0;
}

.lob-offering.active:hover,
.lob-offering.selected:hover {
    background: rgba(0, 200, 176, .15);
}

.lob-offering-title {
    color: var(--color-gray-900);
    font-size: 16px;
    font-family: var(--font-sans);
    font-weight: 500;
}

.lob-offering-provider {
    font-size: 14px;
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--color-gray-600);
}

/* Badges */
.lob-badges {
    display: flex;
    gap: 7px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.lob-badges span {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 8px;
    color: var(--color-black);
    font-family: var(--font-sans);
    background: #fff;
    border: 1px solid var(--color-gray-border-100);
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.lob-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.lob-actions {
    display: flex;
    gap: 12px;
    /* margin-top: 8px; */
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.lob-dialog-body .lob-btn-primary {
    /* flex: 1; */
    padding: 12px 24px;
    border: none;
    border: 0;
    font-weight: 700;
}

.lob-dialog-body .lob-btn-link {
    background: none;
    border: 0;
    /* color: #fc792c; */
    padding: 12px 24px;
    font-size: 14px;
    font-family: var(--font-poppins);
    font-weight: 700;
    cursor: default;
    text-underline-offset: 4px;
    text-decoration: none;
    border: 1px solid var(--border);
}

.lob-dialog-body .lob-btn-link:hover {
    /* text-decoration: underline; */
    background-color: var(--accent);
}

.lob-dialog-close svg {
    width: 16px;
    height: 16px;
}

/* Animation */
@keyframes lob-dialog-in {
    from {
        opacity: 0;
        transform: scale(.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lob-field .field-hint {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 400;
}

.lob-actions .lob-btn-link {
    order: 1;
}

.lob-actions .lob-btn-primary {
    order: 2;
}

input.lob-input-readonly {
    background: #f3f3f561;
    cursor: default;
    opacity: 0.6;
}

input.lob-input-readonly:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.lob-actions .lob-btn-primary svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 10px;
}

/* ##css_overrides_end */


/* Responsive Design */
@media (max-width: 1024px) {
    .lob-offering-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .lob-offering-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .lob-offering-detail {
        padding: 0;
        margin: 0;
    }

    .lob-offering-header h1 {
        font-size: 28px;
    }

    .lob-offering-description h2,
    .lob-offering-categories h2,
    .lob-offering-contact h2 {
        font-size: 22px;
    }

    .lob-offering-details,
    .lob-offering-requirements,
    .lob-offering-additional {
        padding: 20px;
    }
}

@media (max-width: 480px) {

    /* .lob-back-nav responsive styles moved to custom.css */

    .lob-offering-image {
        margin-bottom: 24px;
    }

    .lob-offering-header h1 {
        font-size: 24px;
    }

    .lob-provider {
        font-size: 16px;
    }

    .lob-offering-description,
    .lob-offering-categories,
    .lob-offering-contact {
        margin-bottom: 32px;
    }

    .lob-offering-details h3,
    .lob-offering-requirements h3,
    .lob-offering-additional h3 {
        font-size: 18px;
    }
}