/**
 * File: components.css
 * Path: /wp-content/themes/msi-theme/assets/css/components.css
 * Version: 1.0.24-dev
 * Created: 2026-11-23
 * Last Updated: 2026-11-28
 * Author: Lucky Mahrus | https://geraisitus.co.id/
 * Description: Opt-in utility components for BeBuilder classes prefixed msi-.
 * Changelog: 1.0.3-dev — Encoded footer email with icon; 1.0.0-dev — Container, section, buttons, cards and image utilities.
 */

/* Apply classes msi-* manually in BeBuilder. Nothing here changes parent defaults. */
body.msi-theme .msi-container {
    width: min(calc(100% - 40px), var(--msi-container-width));
    margin-inline: auto;
}

body.msi-theme .msi-section {
    padding-block: var(--msi-space-6);
}

body.msi-theme .msi-section--muted {
    background: var(--msi-surface-alt);
}

body.msi-theme .msi-text-red { color: var(--msi-red); }
body.msi-theme .msi-text-green { color: var(--msi-green); }

body.msi-theme .msi-card {
    border: 1px solid var(--msi-border);
    border-radius: var(--msi-radius-md);
    background: var(--msi-surface);
    overflow: hidden;
}

body.msi-theme .msi-image-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.msi-theme .msi-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--msi-green);
    color: #fff;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease;
}

body.msi-theme .msi-button:hover,
body.msi-theme .msi-button:focus-visible {
    background: var(--msi-green-dark);
    color: #fff;
}

body.msi-theme .msi-button--red { background: var(--msi-red); }
body.msi-theme .msi-button--red:hover,
body.msi-theme .msi-button--red:focus-visible { background: var(--msi-red-dark); }


/* MSI Footer - Encoded Email with Icon */
a.msi-footer-email.lmcore-encoded-email-link {
    display: inline-flex !important;
    align-items: center;
    gap: 18px;

    color: #fff !important;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
}

a.msi-footer-email.lmcore-encoded-email-link::before {
    content: "";
    display: block;
    width: 25px;
    height: 20px;
    flex: 0 0 25px;

    background: center / contain no-repeat url(
      "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 20'%3E%3Crect x='1' y='1' width='24' height='18' fill='none' stroke='white' stroke-width='1.5'/%3E%3Cpath d='M1.5 2l11.5 9 11.5-9' fill='none' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E"
    );
}

a.msi-footer-email.lmcore-encoded-email-link:hover {
    opacity: 0.8;
}
