/*! Pool Builder Plugin — Financing Tooltip component
   05-components.financing-tooltip.css
   Extracted verbatim from pb-sections.css (WPPB FINANCING TOOLTIP section).
   The hover tooltip shown next to the financing/monthly-price figure. */

/* Base tooltip styles */
#wppb_wrapper .wppb-financing-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    min-width: 400px;
    max-width: 450px;
    white-space: normal;
    word-wrap: break-word;
    text-align: left;
    z-index: 10000;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: tooltipFadeIn 0.2s ease-in;
}

/* Tooltip arrow */
#wppb_wrapper .wppb-financing-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
}

/* Fade animations */
@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Tablet styles */
@media (max-width: 768px) {
    #wppb_wrapper .wppb-financing-tooltip {
        min-width: 300px;
        max-width: 350px;
        font-size: 13px;
        padding: 10px 14px;
        left: auto;
        right: 10px;
        transform: none;
    }
    
    #wppb_wrapper .wppb-financing-tooltip::after {
        left: auto;
        right: 20px;
        transform: none;
    }
}

/* Mobile styles - full width modal approach */
@media (max-width: 480px) {
    #wppb_wrapper .wppb-financing-tooltip {
        position: fixed;
        inset: 50% 10px auto;
        transform: translateY(-50%);
        min-width: auto;
        max-width: none;
        width: auto;
        max-height: 80vh;
        overflow-y: auto;
        font-size: 14px;
        padding: 16px 40px 16px 16px;
        border-radius: var(--wppb-radius-md);
        box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    }
    
    /* Hide arrow on mobile */
    #wppb_wrapper .wppb-financing-tooltip::after {
        display: none;
    }
}

/* Close button styling for mobile */
#wppb_wrapper .wppb-tooltip-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 18px;
    opacity: 0.7;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: opacity 0.2s ease;
}

#wppb_wrapper .wppb-tooltip-close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}
