/* WooCommerce Shipping Address Highlight - Overlay and Tooltip Styles */

/* Dark overlay covering the entire page */
.wcsh-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.wcsh-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Highlight area - creates a "spotlight" effect on the shipping section */
.wcsh-shipping-highlight {
    position: relative;
    z-index: 9999;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.5),
                0 0 30px rgba(33, 150, 243, 0.3);
    border-radius: 4px;
    animation: wcsh-pulse 2s ease-in-out infinite;
}

@keyframes wcsh-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.5),
                    0 0 30px rgba(33, 150, 243, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(33, 150, 243, 0.7),
                    0 0 40px rgba(33, 150, 243, 0.5);
    }
}

/* Tooltip/Speech bubble */
.wcsh-tooltip {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2196F3;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    animation: wcsh-tooltip-appear 0.5s ease-in-out 0.5s forwards;
    max-width: 90vw;
    white-space: normal;
    text-align: center;
}

/* Speech bubble arrow pointing down */
.wcsh-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #2196F3;
}

@keyframes wcsh-tooltip-appear {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Close button (optional) */
.wcsh-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s;
}

.wcsh-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Make sure the shipping section stays visible above overlay */
.woocommerce-shipping-calculator {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wcsh-tooltip {
        top: -80px;
        padding: 10px 15px;
        font-size: 13px;
        max-width: 85vw;
    }
}

@media (max-width: 480px) {
    .wcsh-tooltip {
        top: -90px;
        padding: 8px 12px;
        font-size: 12px;
        max-width: 80vw;
    }
}
