/* Products list: clean, professional table */
.products-table-limited {
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.products-table-limited thead th {
    background: #f7f9fb;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #e6edf4;
    padding: 12px 16px;
}

.products-table-limited tbody td {
    color: #1f2937;
    font-size: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f6;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
}

.products-table-limited tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.products-table-limited tbody tr:hover td {
    background: #f4f8fb;
}

/* Global fix for product descriptions formatting - Max specificity - Adjusted for HTML content */
#items-list-table td.items_col_description,
#category-items-table td.items_col_description,
.products-table-limited td.items_col_description,
.text-wrap-new-lines {
    white-space: normal !important;
    word-break: break-word !important;
}

#items-list-table td.items_col_description p,
#category-items-table td.items_col_description p,
.products-table-limited td.items_col_description p,
.text-wrap-new-lines p {
    margin-bottom: 5px !important;
}

#items-list-table td.items_col_description ul,
#category-items-table td.items_col_description ul,
.products-table-limited td.items_col_description ul,
.text-wrap-new-lines ul {
    margin-bottom: 5px !important;
    padding-left: 1.5rem !important;
}

/* Proposal and Document color overrides */
.proposal-template-wrap .proposal-template .pt-muted {
    color: #000000 !important;
}

.docs-main-wrapper {
    color: #000000 !important;
    font-size: 12px !important;
}

/* Custom font overrides for specific elements in proposals */
.proposal-template-wrap .proposal-template .pt-recipient,
.proposal-template-wrap .proposal-template .pt-title {
    font-family: "Public Sans regular" !important;
    font-weight: 500 !important;
}

/* Global font override for all other text in the proposal */
.proposal-template-wrap .proposal-template * {
    font-family: "Public Sans Light", Helvetica, Arial, sans-serif !important;
    font-weight: 300;
    color: #000000 !important;
}

/* Link styled as a professional button when title="bouton" - ONLY IN PROPOSALS */
.proposal a[title="bouton"],
.proposal-pdf a[title="bouton"] {
    display: inline-block;
    background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%);
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    margin-top: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Icône flèche */
.proposal a[title="bouton"]::after,
.proposal-pdf a[title="bouton"]::after {
    content: "➜";
    margin-left: 8px;
    font-size: 14px;
    transition: transform 0.25s ease;
}

/* Hover */
.proposal a[title="bouton"]:hover,
.proposal-pdf a[title="bouton"]:hover {
    background: linear-gradient(135deg, #e6c65c 0%, #c9a93a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(180, 150, 50, 0.25);
}

/* Animation icône au hover */
.proposal a[title="bouton"]:hover::after,
.proposal-pdf a[title="bouton"]:hover::after {
    transform: translateX(3px);
}

/* Modal Selector Toggle Buttons (Estimates, Proposals, Invoices) */
.client-selector-links,
.modal-selector-links {
    display: flex !important;
    background: #f4f7fa !important;
    padding: 5px !important;
    border-radius: 12px !important;
    margin-top: 10px !important;
    margin-bottom: 25px !important;
    border: 1px solid #eef2f6 !important;
    width: 100% !important;
    max-width: 400px !important;
    position: relative !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    box-sizing: border-box !important;
    flex-direction: row-reverse;
}

.client-selector-links a,
.modal-selector-links a,
.customer-type-selector,
.client-type-selector {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    /* Force vertical centering */
    justify-content: center !important;
    /* Force horizontal centering */
    height: 40px !important;
    /* Exact fixed height */
    line-height: normal !important;
    /* Let flex handle it */
    padding: 0 15px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    text-align: center !important;
    border: none !important;
    cursor: pointer !important;
    background: transparent !important;
    white-space: nowrap !important;
    margin: 0 !important;
    /* Clear any margins */
}

.client-selector-links a:hover,
.modal-selector-links a:hover,
.client-type-selector:hover,
.customer-type-selector:hover {
    color: #1e293b !important;
    background: rgba(255, 255, 255, 0.4) !important;
}

.client-selector-links a.active,
.modal-selector-links a.active,
.customer-type-selector.active,
.client-type-selector.active {
    background: #ffffff !important;
    color: #1586b0 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    /* Ensure no shifts in active state */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}