/* BP WhatsApp Contact Me — front-end styles v1.7.2 */

/*
 * SCOPING STRATEGY
 * ================
 * Every rule targets only classes that belong exclusively to this plugin:
 *   .bpwac-whatsapp-button   — the WhatsApp action button
 *   .bpwac-profile-button    — modifier class for profile header context
 *   .bpwac-settings-wrap     — the shortcode form container
 *   .bpwac-icon              — inline SVG icon (child of the button only)
 *   .bpwac-label             — text span inside the button
 *   .bpwac-active-field /
 *   .bpwac-use-field         — admin field browser (wp-admin only)
 *
 * v1.7.2 change: !important declarations added to core button properties
 * (background-color, color, border, box-shadow, text-decoration) so the
 * button colour is not overridden by aggressive theme or BuddyPress styles
 * that target generic anchor elements. !important is intentionally limited
 * to these visual properties — layout properties (display, padding, etc.)
 * remain without it so container themes can still control sizing if needed.
 *
 * Profile header buttons (.bpwac-profile-button) receive an extra explicit
 * background-color rule with !important, as profile header areas in many
 * BuddyPress themes apply strongly-scoped colour overrides.
 */

/* ── WhatsApp button ─────────────────────────────────────────────────────── */
a.bpwac-whatsapp-button,
a.bpwac-whatsapp-button:visited {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #00c573 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
    vertical-align: middle;
    box-shadow: none !important;
    letter-spacing: normal;
    text-transform: none;
}

a.bpwac-whatsapp-button:hover,
a.bpwac-whatsapp-button:active {
    background-color: #00a85f !important;
    box-shadow: 0 2px 8px rgba(0, 197, 115, 0.45) !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Profile header variant (.bpwac-profile-button) ─────────────────────── */
/*
 * BuddyPress profile header areas frequently apply colour rules via highly
 * specific selectors (e.g. #item-header-content .generic-button a). The
 * explicit !important below guarantees the WhatsApp green is always shown
 * regardless of the active theme's header-area colour cascade.
 */
a.bpwac-whatsapp-button.bpwac-profile-button,
a.bpwac-whatsapp-button.bpwac-profile-button:visited {
    background-color: #00c573 !important;
    color: #fff !important;
}

a.bpwac-whatsapp-button.bpwac-profile-button:hover,
a.bpwac-whatsapp-button.bpwac-profile-button:active {
    background-color: #00a85f !important;
    color: #fff !important;
}

/* Accessibility: hide outline for mouse, show for keyboard (WCAG 2.4.11). */
a.bpwac-whatsapp-button:focus         { outline: none; }
a.bpwac-whatsapp-button:focus-visible {
    outline: 3px solid #00c573;
    outline-offset: 2px;
    box-shadow: 0 2px 8px rgba(0, 197, 115, 0.45);
}

/* Loading state — set by [aria-busy="true"] while AJAX resolves */
a.bpwac-whatsapp-button[aria-busy="true"] {
    opacity: 0.65;
    pointer-events: none;
    cursor: wait;
}

/* ── Inline SVG icon ─────────────────────────────────────────────────────── */
a.bpwac-whatsapp-button .bpwac-icon {
    flex-shrink: 0;
    vertical-align: middle;
    fill: currentColor;
    width: 1em;
    height: 1em;
}

/* ── Directory / Featured Members compact variant ────────────────────────── */
a.bpwac-whatsapp-button.bpwac-directory-button,
a.bpwac-whatsapp-button.bpwac-directory-button:visited {
    padding: 6px 12px;
    font-size: 14px;
    min-width: 140px;
    justify-content: center;
	letter-spacing: 1px;
}

a.bpwac-whatsapp-button.bpwac-directory-button:hover {
    box-shadow: 0 2px 6px rgba(0, 197, 115, 0.4);
}

/* ── Shortcode settings form ─────────────────────────────────────────────── */

/* Every rule below is scoped to .bpwac-settings-wrap so nothing leaks out */
.bpwac-settings-wrap {
    font-family: inherit;
    width: 100%;
    text-align: center;
}

.bpwac-settings-wrap .bpwac-error,
.bpwac-settings-wrap .bpwac-success,
.bpwac-settings-wrap .bpwac-notice-info {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    text-align: left;
}

.bpwac-settings-wrap .bpwac-error {
    background: #fdecea;
    border-left: 4px solid #e53935;
    color: #b71c1c;
}

.bpwac-settings-wrap .bpwac-success {
    background: #e8f5e9;
    border-left: 4px solid #43a047;
    color: #1b5e20;
}

.bpwac-settings-wrap .bpwac-notice-info {
    background: #e8f4fd;
    border-left: 4px solid #1976d2;
    color: #0d47a1;
}

.bpwac-settings-wrap .bpwac-field-group {
    margin-bottom: 20px;
}

.bpwac-settings-wrap .bpwac-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-style: normal;
    letter-spacing: 1px;
}

.bpwac-settings-wrap .bpwac-input,
.bpwac-settings-wrap .bpwac-select {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #bdc3c7;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 8px;
    background: #ffffff;
    border-radius: 3px;
}

.bpwac-settings-wrap .bpwac-input:focus,
.bpwac-settings-wrap .bpwac-select:focus {
    border-color: #00c573;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 197, 115, .25);
}

.bpwac-settings-wrap .bpwac-input:focus-visible,
.bpwac-settings-wrap .bpwac-select:focus-visible {
    outline: 3px solid #00c573;
    outline-offset: 1px;
}

.bpwac-settings-wrap .bpwac-description   { font-size: 13px; color: #666; }
.bpwac-settings-wrap .bpwac-forced-notice  { color: #b45309; font-style: italic; }
.bpwac-settings-wrap .bpwac-submit-wrap    { margin-top: 8px; }
.bpwac-settings-wrap .bpwac-notice         { color: #555; font-style: italic; }

.bpwac-settings-wrap .bpwac-button {
    display: inline-block;
    background-color: #00c573;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 70%;
    text-decoration: none;
}

.bpwac-settings-wrap .bpwac-button:hover         { background-color: #00a85f; }
.bpwac-settings-wrap .bpwac-button:focus         { outline: none; }
.bpwac-settings-wrap .bpwac-button:focus-visible { outline: 3px solid #00c573; outline-offset: 2px; }

/* ── Admin field browser (wp-admin only) ─────────────────────────────────── */
.bpwac-active-field { font-weight: bold; }
.bpwac-use-field    { text-decoration: underline; cursor: pointer; }