/**
 * Logo inisial masjid — konsisten di semua tema website publik.
 * v2: per-theme colors, responsive clamp, professional.
 */

/* ── Base ─────────────────────────────────────── */
.mosque-logo-initials {
    box-sizing: border-box;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Text gradient (Nabawi) ───────────────────── */
.mosque-logo-initials--text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.75rem;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.mosque-logo-initials--nabawi {
    background: linear-gradient(135deg, #0a3d35 0%, #145a4a 50%, #c9a227 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ── Badge box — shared base ──────────────────── */
.mosque-logo-initials--box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(2.5rem, 8vw, 5.5rem);
    height: clamp(2.25rem, 6vw, 3.25rem);
    padding: 0 clamp(0.5rem, 1.5vw, 1rem);
    border-radius: 0.6rem;
    font-size: clamp(0.8rem, 2vw, 1.05rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    transition: opacity 0.2s;
    /* Default neutral — also covers legacy "box" variant */
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ── Flexstart (blue #4154f1 / #012970) ──────── */
.mosque-logo-initials--flexstart {
    background: linear-gradient(135deg, #012970 0%, #4154f1 100%);
    box-shadow: 0 2px 10px rgba(65, 84, 241, 0.28);
}

/* ── Flexstart2 (deep indigo → purple) ──────── */
.mosque-logo-initials--flexstart2 {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 55%, #7c3aed 100%);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.28);
}

/* ── Adam (teal #1acc8d) ─────────────────────── */
.mosque-logo-initials--adam {
    background: linear-gradient(135deg, #0d4a3e 0%, #1acc8d 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(26, 204, 141, 0.28);
}

/* ── Box-lg (tema1, websitexxx) ──────────────── */
.mosque-logo-initials--box-lg {
    min-width: clamp(3rem, 10vw, 6.75rem);
    height: clamp(2.5rem, 7vw, 3.75rem);
    padding: 0 clamp(0.625rem, 2vw, 1.25rem);
    border-radius: 0.75rem;
    font-size: clamp(0.9rem, 2.2vw, 1.25rem);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

/* ── Sajada (gradient defined in sajada/style.css) ── */
.sajada-logo-badge.mosque-logo-initials {
    width: auto;
    min-width: clamp(2rem, 5vw, 2.875rem);
    height: clamp(2rem, 5vw, 2.75rem);
    padding: 0 clamp(0.5rem, 1.5vw, 0.75rem);
    font-size: clamp(0.7rem, 1.8vw, 0.95rem);
    letter-spacing: 0.03em;
    border-radius: 0.5rem;
}

.sajada-logo-badge--sm.mosque-logo-initials {
    min-width: clamp(1.6rem, 4vw, 2.25rem);
    height: clamp(1.6rem, 4vw, 2rem);
    padding: 0 clamp(0.35rem, 1vw, 0.625rem);
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    border-radius: 0.375rem;
    letter-spacing: 0.02em;
}

/* ── Paired with logo text span ─────────────── */
.logo .mosque-logo-initials + span,
.logo .mosque-logo-initials + .logo-name {
    margin-left: 0.5rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: clamp(80px, 20vw, 180px);
}

/* ── Very narrow viewports (< 360px) ─────────── */
@media (max-width: 360px) {
    .mosque-logo-initials--box {
        min-width: 2.2rem;
        height: 2.2rem;
        padding: 0 0.4rem;
        font-size: 0.72rem;
        border-radius: 0.45rem;
    }
    .mosque-logo-initials--text {
        font-size: 0.9rem;
        padding: 0.2rem 0.5rem;
    }
}

/* ── Desktop refinements ─────────────────────── */
@media (min-width: 992px) {
    .mosque-logo-initials--text {
        font-size: 1.2rem;
        padding: 0.4rem 1rem;
        letter-spacing: 0.06em;
    }
    .mosque-logo-initials--box {
        min-width: 5.5rem;
        height: 3.25rem;
        font-size: 1.05rem;
        padding: 0 1rem;
    }
    .mosque-logo-initials--box-lg {
        min-width: 6.75rem;
        height: 3.625rem;
        font-size: 1.25rem;
        padding: 0 1.125rem;
    }
}

/* ── Businex / site-logo-link compat ─────────── */
.site-logo-link .mosque-logo-initials--box {
    min-width: 5.5rem;
}
.site-logo-link .mosque-logo-initials--text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.85rem;
    padding: 0.35rem 0.875rem;
    letter-spacing: 0.04em;
}
