﻿/* CommercialQualityCompensation tooltip theme (Enerjisa style)
   Works with Bootstrap tooltips (v4/v5).
*/

/* Make tooltip container fully opaque (Bootstrap uses opacity transition on .tooltip) */
.tooltip.commercial-quality-compensation-tooltip {
    opacity: 1 !important;
}

/* Base tooltip box */
.tooltip.commercial-quality-compensation-tooltip .tooltip-inner,
.bs-tooltip-top.commercial-quality-compensation-tooltip .tooltip-inner,
.bs-tooltip-end.commercial-quality-compensation-tooltip .tooltip-inner,
.bs-tooltip-bottom.commercial-quality-compensation-tooltip .tooltip-inner,
.bs-tooltip-start.commercial-quality-compensation-tooltip .tooltip-inner {
    min-width: 700px;            /* ~3x wider for readability */
    width: 100%;
    padding: 0;
    background: #ffffff !important;   /* ensure no black */
    color: #575757;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0,0,0,.18);
    text-align: left;
    opacity: 1 !important;           /* prevent seeing table behind */
}

/* Arrow: match border (do not force black) */
.tooltip.commercial-quality-compensation-tooltip .tooltip-arrow::before,
.tooltip.commercial-quality-compensation-tooltip .arrow::before {
    border-right-color: #d9d9d9 !important;
    border-left-color: #d9d9d9 !important;
    border-top-color: #d9d9d9 !important;
    border-bottom-color: #d9d9d9 !important;
}

.cqc-tt {
    font-size: 14px;
    line-height: 20px;
    background: #ffffff;
       border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.cqc-tt__header {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    border-bottom: 1px solid #e6e6e6;
    background: #f9c800; /* Enerjisa yellow */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.cqc-tt__subheader {
    padding: 10px 16px;
    font-weight: 700;
    border-bottom: 1px solid #efefef;
    background: #ffffff;
    color: #2b2b2b;
}

.cqc-tt__row {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-word;
    background: #ffffff;
    color: #575757;
}

.cqc-tt__row:nth-child(odd) {
    background: #f7f7f7;
}

.cqc-tt__row:last-child {
    border-bottom: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.cqc-tt__period,
.cqc-tt__amount {
    font-weight: 700;
    color: #2b2b2b;
}

/* Make the whole td look interactive when it has tooltip */
.cqc-tooltip-td[data-toggle="tooltip"],
.cqc-tooltip-td[data-bs-toggle="tooltip"] {
    cursor: pointer;
}

/* Copyable invoice number styling */
.cqc-copy {
    cursor: pointer;
    text-decoration: underline;
    color: #2b2b2b;
    font-weight: 700;
}

.cqc-copy:hover {
    color: #000;
}

/* Small copied info badge (in-tooltip) */
.cqc-copied-badge {
    position: absolute;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: #f9c800;
    color: #2b2b2b;
    box-shadow: 0 8px 16px rgba(0,0,0,.14);
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s ease-in-out;
}

.cqc-copied-badge.is-visible {
    opacity: 1;
}

/* Hover hint for copyable invoice inside the tooltip */
.cqc-copy {
    position: relative;
}

.cqc-copy__hint {
    position: absolute;
    left: 50%;
    top: -34px;
    transform: translateX(-50%);
    white-space: nowrap;
    background: rgb(243, 243, 243);
    color: #000;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 4px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,.16);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease-in-out, visibility .3s ease-in-out;
    pointer-events: none;
    z-index: 2;
}

.cqc-copy__hint::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #2b2b2b transparent transparent transparent;
}

.cqc-copy.cqc-hint-show .cqc-copy__hint {
    opacity: 1;
    visibility: visible;
}
