/* ==========================================================================
 * Contact button (.contact-option) — the template product page's «مساعدة؟» buttons, moved here
 * unchanged so every page draws the SAME button. The WhatsApp one is rendered ONLY by
 * pages/user/includes/components/whatsapp-contact-button.php: white, light border, the original
 * green WhatsApp icon, its label beside it. A page that offers WhatsApp contact loads this file
 * (getCssPath('contact_option')) and includes that component — it never draws its own button.
 * Colours fall back to the template page's own tokens (template_product.css :root) where that
 * file is not loaded, so the button is identical everywhere.
 * ======================================================================== */
.contact-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #fff;
    border: 1px solid var(--tp-border, #e9ecef);
    border-radius: 8px;
    color: var(--tp-dark, #2d3436);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.contact-option:hover,
.contact-option:focus,
.contact-option:active {
    background: var(--tp-primary, var(--theme-primary, #522546));
    border-color: var(--tp-primary, var(--theme-primary, #522546));
    color: #fff;
    text-decoration: none;
}

.contact-option:hover .contact-option-icon,
.contact-option:focus .contact-option-icon,
.contact-option:active .contact-option-icon {
    filter: none;
}

.contact-option i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-option-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    object-fit: contain;
}

.contact-option-label {
    display: none;
    font-size: 0.875rem;
    line-height: 1;
    white-space: nowrap;
}

/* Always show a visible label, even if icon/text nodes are missing */
.contact-option::after {
    content: attr(aria-label);
    font-size: 0.875rem;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    .contact-option {
        min-height: 46px;
        padding: 0.7rem 0.8rem;
        border-radius: 10px;
    }

    .contact-option-icon {
        width: 24px;
        height: 24px;
    }

    .contact-option::after {
        font-size: 0.85rem;
    }
}

[dir="rtl"] .contact-option {
    flex-direction: row-reverse;
}
