﻿/* =========================================================
   Global safe resets (ok with MudBlazor)
========================================================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#app {
    min-height: 100%;
}

/* =========================================================
   Member Card – Base container
   - Corporate look, subtle shadow, smoother radius
========================================================= */
.card-shell {
    position: relative;
    width: 540px; /* preview size */
    aspect-ratio: 1000 / 630;
    border-radius: 20px;
    overflow: hidden;
    padding: 0 !important;
    color: #F7F3E8;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
    background: radial-gradient(circle at top left, #17726f 0%, #0a4743 45%, #041f21 100%);
}

/* Large card (dialog) */
.card-shell--lg {
    width: 820px;
    max-width: 94vw;
}

/* Optional: center card in your preview container */
.member-cardPreview {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

/* =========================================================
   Card sides + background SVG
========================================================= */
.card-side {
    position: absolute;
    inset: 0;
}

/* SVG backgrounds – keep, but remove harsh edges */
.card-bg {
    z-index: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 0 0 transparent);
}

/* =========================================================
   Flip button – glassy pill
========================================================= */
.card-flipBtnWrap {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 6;
}

.card-flipBtn {
    background: linear-gradient(135deg, rgba(10, 71, 67, 0.9), rgba(17, 88, 87, 0.9));
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   Generic slot styling
========================================================= */
.slot {
    position: absolute;
    color: #FDF9ED;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    z-index: 2;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- FRONT slots ---------- */
.card-front .company {
    left: 6%;
    top: 7%;
    width: 62%;
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.02em;
}

/* inline tier badge beside company name */
.company-tier {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.company-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tier badge – more “bank card” look */
.tier-chip {
    font-size: 0.70rem !important;
    padding: 2px 10px !important;
    border-radius: 999px;
    line-height: 1.1;
    background: radial-gradient(circle at 20% 0%, #fceab6 0%, #f2d27a 45%, #c89b3c 100%);
    color: #2a210c !important;
    border: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Premium member number */
.card-front .memberno-premium {
    left: 50%;
    top: 46%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: 0.48em;
    padding-left: .48em;
    line-height: 1;
    opacity: .98;
    font-family: "Roboto Mono", monospace;
    background: linear-gradient(90deg, #F9D976 0%, #F5C542 22%, #F2B705 44%, #E8A200 66%, #FFD87B 88%, #F9D976 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 0 rgba(255,255,255,0.15), 0 4px 8px rgba(0,0,0,0.45), 0 0 14px rgba(255,215,0,0.30);
    background-image: linear-gradient(90deg, rgba(255,255,255,0.15), rgba(0,0,0,0.35)), linear-gradient(90deg, #F9D976, #E8A200);
    background-blend-mode: overlay;
}

.card-front .license {
    left: 6%;
    bottom: 19%;
    width: 62%;
    font-size: 0.86rem;
    opacity: 0.95;
}

.card-front .province {
    left: 6%;
    bottom: 12%;
    width: 62%;
    font-size: 0.86rem;
    opacity: 0.90;
}

.card-front .status {
    right: 6%;
    top: 6%;
}

/* expiry under the status (right side) */
.card-front .expiry {
    right: 6%;
    top: 16%;
    max-width: 30%;
    font-size: 0.78rem;
    opacity: 0.93;
    text-align: right;
}

/* QR container (bottom-right) */
.card-front .qrbox {
    position: absolute;
    right: 24px;
    bottom: 28px;
    width: 110px;
    height: 110px;
    border-radius: 16px;
    background: radial-gradient(circle at top left, #ffffff 0%, #f5f0e4 55%, #e4d8c2 100%);
    padding: 10px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(242, 210, 122, 0.55);
}

/* Legacy QR image (if ever needed) */
.card-front .qrimg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =========================================================
   BACK SIDE – Corporate design (no phone/email boxes)
========================================================= */

/* Premium light glow panel behind photo */
.card-back::before {
    content: "";
    position: absolute;
    right: -9%;
    top: -12%;
    width: 50%;
    height: 138%;
    background: radial-gradient(circle at top, rgba(255, 232, 184, 0.22) 0%, rgba(255, 232, 184, 0.10) 45%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* NAME */
.card-back .director {
    left: 6%;
    top: 16%;
    width: 60%;
    font-size: 1.24rem;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: 0.015em;
    z-index: 3;
    text-shadow: 0 2px 6px rgba(0,0,0,.45);
}

/* ROLE badge – minimal */
.card-back .role {
    left: 6%;
    top: 24%;
    font-size: .74rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .90;
    z-index: 3;
}

/* PHONE – elegant inline text */
.card-back .phone {
    left: 6%;
    top: 38%;
    font-size: .92rem;
    opacity: .96;
    z-index: 3;
    font-weight: 500;
    letter-spacing: .01em;
    text-shadow: 0 2px 5px rgba(0,0,0,.45);
}

/* EMAIL – aligned under phone */
.card-back .email {
    left: 6%;
    top: 45%;
    width: 58%;
    font-size: .92rem;
    opacity: .96;
    z-index: 3;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 5px rgba(0,0,0,.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PORTRAIT */
.card-back .photo {
    right: 7%;
    top: 18%;
    width: 22%;
    aspect-ratio: 3/4;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(241, 210, 121, .85);
    box-shadow: 0 18px 42px rgba(0,0,0,.55);
    background: #fff;
    z-index: 3;
}

/* Clamp long names gracefully */
.card-back .director {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   BACK LOGO – perfectly centered watermark
============================================ */
.back-logo-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;

}

    /* LOGO: premium transparent look */
    .back-logo-wrap img {
        width: 34%;
        opacity: 0.20;
        filter: none;
        user-select: none;
        -webkit-user-drag: none;
        mix-blend-mode: soft-light;
    }

/* ============================================
   FRONT LOGO – centered watermark
============================================ */
.front-logo-wrap {
    position: absolute;
    inset: 0;
    z-index: 1; /* under text, above background */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

    .front-logo-wrap img {
        width: 34%;
        opacity: 0.45;
        mix-blend-mode: soft-light;
        filter: saturate(2.2) brightness(1.3);
        user-select: none;
        -webkit-user-drag: none;
    }


/* =========================================================
   Large mode tuning (dialog)
========================================================= */
.card-shell--lg .card-front .qrbox {
    width: 20%;
}

.card-shell--lg .card-back .photo {
    width: 22%;
}

.card-shell--lg .qr-logo {
    width: 18%;
}

/* =========================================================
   Premium QR container & logo
========================================================= */
/* QR container (bottom-right) */
/* QR container: only positioning, NO visual frame */
.card-front .qrbox {
    position: absolute;
    right: 24px;
    bottom: 28px;
    width: 118px;
    height: 118px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0; /* let the QR itself define the shape */
}

/* Just pass-through sizing */
.qrbox--premium {
    width: 100%;
    height: 100%;
}

/* Wrapper so SVG fills the area */
.qr-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

/* QR itself – full bleed */
.qr-svg {
    width: 100%;
    height: 100%;
    border-radius: 12px; /* optional soft corners on the QR itself */
    overflow: hidden;
    background: none;
}

    .qr-svg svg {
        width: 100%;
        height: 100%;
        display: block;
    }

/* Logo in the middle stays as-is */
.qr-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 26%;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background: #ffffff;
    padding: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.5);
    pointer-events: none;
}

    .qr-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

/* We don't use caption anymore */
.qr-caption {
    display: none;
}

