/* mw-ui-fix.css - small shared fixes for every member website theme (business-card templates and PHP themes).
   Works with mw-ui-fix.js, which adds the classes below only where a problem is actually found, so a theme that
   already looks right is left exactly as it was. */

/* 1) Icon-only links (social icons, floating call/WhatsApp, share...) - icon exactly in the middle of its circle/square */
.mw-ic-i { display: inline-flex !important; }
.mw-ic-b { display: flex !important; }
.mw-ic { align-items: center !important; justify-content: center !important; text-align: center !important; place-items: center !important; line-height: 1 !important; }
.mw-ic > i, .mw-ic > svg, .mw-ic > .bi, .mw-ic > span.icon {
    display: block !important; margin: 0 !important; line-height: 1 !important; vertical-align: middle !important;
    top: auto !important; transform: none; flex: none !important; text-align: center;
}
.mw-ic > i.bi::before, .mw-ic > .bi::before { vertical-align: 0 !important; display: block !important; line-height: 1 !important; }
.mw-ic > i[class*="fa-"]::before { display: block; line-height: 1; }

/* 2) Buttons that sit together stay side by side (they used to drop to the next line) */
.mw-btnrow {
    display: flex !important; flex-wrap: nowrap !important; gap: 8px !important;
    align-items: stretch !important; flex-direction: row !important;
}
.mw-btnrow > .mw-btn-i {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    flex: 0 1 auto !important; min-width: min-content !important; max-width: none !important; width: auto !important;
    margin-left: 0 !important; margin-right: 0 !important; white-space: normal !important;
    text-align: center !important; line-height: 1.25 !important; overflow-wrap: break-word;
}
@media (max-width: 575.98px) {
    .mw-btnrow { gap: 6px !important; }
    .mw-btnrow > .mw-btn-i {
        flex: 1 1 0 !important; min-width: 0 !important; overflow-wrap: break-word; padding-left: 8px !important; padding-right: 8px !important;
        font-size: clamp(11px, 3.3vw, 14px) !important; letter-spacing: 0 !important; gap: 4px !important;
    }
    /* four buttons in one row: drop the small icons so the words fit */
    .mw-btnrow-many > .mw-btn-i > i, .mw-btnrow-many > .mw-btn-i > svg { display: none !important; }
    .mw-btnrow-many > .mw-btn-i { padding-left: 4px !important; padding-right: 4px !important; }
}

/* 3) Logo on a dark footer: dark logos are flipped light, logos with a white background get a small white tag */
.mw-logo-inv { filter: invert(1) hue-rotate(180deg) brightness(1.15) !important; }
.mw-logo-tag { background: #fff !important; padding: 6px 10px !important; border-radius: 10px !important; box-sizing: content-box !important; }

/* 4) See-through logo placed on the member's brand dark / soft colour where it would otherwise disappear */
.mw-logo-chip { background: var(--mw-chip) !important; padding: 6px 10px !important; border-radius: 10px !important; box-sizing: content-box !important; filter: none !important; }

/* 5) Header logo: a little smaller on desktop, the same in every theme (phones keep each theme's own size) */
@media (min-width: 992px) {
    img.mw-hd-logo { height: 36px !important; max-height: 36px !important; width: auto !important; max-width: 170px !important; object-fit: contain !important; }
}
