/* Carteirinha Digital RFCC - visual de documento digital/mobile wallet */

.rfcc-carteirinha-screen {
    position: fixed;
    inset: 0;
    z-index: 20000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 100dvh;
    padding: max(18px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 15% 6%, rgba(216, 85, 117, .18), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(255, 189, 207, .20), transparent 28%),
        linear-gradient(180deg, #fff7fa 0%, #fff 44%, #fff4f7 100%);
    color: #142a52;
}

.rfcc-carteirinha-loading {
    min-height: 85dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #a83d61;
    font-weight: 800;
}

.rfcc-carteirinha-appbar {
    width: min(430px, 100%);
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 12px;
}

.rfcc-carteirinha-icon-btn,
.rfcc-carteirinha-nfc {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(216, 85, 117, .18);
    background: rgba(255, 235, 242, .86);
    color: #bd4868;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 28px rgba(169, 65, 96, .10);
}

.rfcc-carteirinha-icon-btn {
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.rfcc-carteirinha-nfc {
    font-size: .95rem;
    font-weight: 900;
    letter-spacing: -3px;
    padding-right: 4px;
}

.rfcc-carteirinha-title strong,
.rfcc-carteirinha-title span {
    display: block;
}

.rfcc-carteirinha-title strong {
    font-size: 1.23rem;
    line-height: 1.05;
    color: #15325f;
}

.rfcc-carteirinha-title span {
    margin-top: 3px;
    color: #d45675;
    font-weight: 700;
}

.rfcc-digital-card {
    position: relative;
    width: min(430px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(216, 85, 117, .24);
    background:
        linear-gradient(135deg, rgba(255,255,255,.94) 0%, rgba(255,248,250,.96) 44%, rgba(255,226,235,.96) 100%);
    box-shadow:
        0 22px 60px rgba(93, 38, 58, .17),
        inset 0 1px 0 rgba(255,255,255,.92);
    isolation: isolate;
}

.rfcc-digital-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0%, rgba(255,255,255,.58) 24%, transparent 38%, rgba(255,255,255,.24) 55%, transparent 72%),
        radial-gradient(circle at 18% 18%, rgba(255,255,255,.8), transparent 26%);
    mix-blend-mode: screen;
    opacity: .85;
    z-index: 1;
}

.rfcc-card-security-pattern {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(34deg, rgba(216,85,117,.055) 0 1px, transparent 1px 7px),
        repeating-linear-gradient(126deg, rgba(20,42,82,.035) 0 1px, transparent 1px 9px);
    opacity: .52;
    z-index: 0;
}

.rfcc-card-rose-mark {
    position: absolute;
    top: 58px;
    right: 22px;
    color: rgba(216, 85, 117, .11);
    font-size: 7.8rem;
    line-height: 1;
    transform: rotate(-12deg);
    z-index: 0;
}

.rfcc-card-header,
.rfcc-card-person,
.rfcc-card-divider,
.rfcc-card-content,
.rfcc-card-footer {
    position: relative;
    z-index: 2;
}

.rfcc-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 24px 10px;
}

.rfcc-card-logo {
    width: 104px;
    height: 104px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(43, 58, 97, .10));
}

.rfcc-card-header-text strong,
.rfcc-card-header-text span,
.rfcc-card-header-text small {
    display: block;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.rfcc-card-header-text strong {
    color: #14325f;
    font-size: .98rem;
    font-weight: 900;
}

.rfcc-card-header-text span,
.rfcc-card-header-text small {
    color: #d45675;
    font-weight: 800;
    font-size: .72rem;
}

.rfcc-card-person {
    display: grid;
    grid-template-columns: 112px 1fr;
    align-items: center;
    gap: 18px;
    padding: 8px 24px 18px;
}

.rfcc-card-photo-frame {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(180deg, #f3a9bd, #fff 45%, #dd6a86);
    box-shadow: 0 12px 26px rgba(152, 62, 91, .18);
}

.rfcc-card-photo,
.rfcc-card-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.rfcc-card-photo-placeholder {
    display: grid;
    place-items: center;
    color: #b94060;
    font-weight: 900;
    font-size: 2.2rem;
    background: linear-gradient(180deg, #fff, #ffe9f0);
}

.rfcc-card-name-box span,
.rfcc-card-field span {
    display: block;
    color: #b94060;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: .045em;
    font-size: .76rem;
}

.rfcc-card-name-box strong {
    display: block;
    margin-top: 4px;
    color: #132b55;
    font-size: clamp(1.45rem, 6vw, 2rem);
    line-height: 1.08;
}

.rfcc-card-divider {
    height: 1px;
    margin: 0 24px;
    background: linear-gradient(90deg, transparent, rgba(216, 85, 117, .52), transparent);
}

.rfcc-card-content {
    display: grid;
    grid-template-columns: 1fr 138px;
    gap: 14px;
    padding: 20px 24px 24px;
}

.rfcc-card-fields {
    display: grid;
    gap: 13px;
}

.rfcc-card-field {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 12px;
}

.rfcc-card-field-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(216, 85, 117, .22);
    background: rgba(255, 230, 238, .72);
    color: #b94060;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.rfcc-card-field-icon-shield {
    background: linear-gradient(180deg, #df8aa0, #bd4868);
    color: #fff;
}

.rfcc-card-field strong {
    display: block;
    margin-top: 2px;
    color: #132b55;
    font-size: 1rem;
    line-height: 1.15;
}

.rfcc-card-status {
    display: inline-flex !important;
    width: fit-content;
    align-items: center;
    min-height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: #e7fff0;
    border: 1px solid #61c982;
    color: #14763b !important;
    font-weight: 900;
}

.rfcc-card-validation {
    align-self: end;
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 0;
}

.rfcc-card-qr {
    width: 128px;
    height: 128px;
    border-radius: 18px;
    padding: 9px;
    background: #fff;
    border: 1px solid rgba(216, 85, 117, .46);
    box-shadow: 0 14px 28px rgba(89, 36, 55, .12);
}

.rfcc-card-qr {
    width: 128px;
    height: 128px;
    border-radius: 18px;
    padding: 9px;
    background: #fff;
    border: 1px solid rgba(216, 85, 117, .46);
    box-shadow: 0 14px 28px rgba(89, 36, 55, .12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rfcc-card-qr-image {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px;
    image-rendering: pixelated;
}

.rfcc-card-validation-text {
    text-align: center;
    color: #d45675;
    line-height: 1.05;
}

.rfcc-card-validation-text span,
.rfcc-card-validation-text strong,
.rfcc-card-validation small {
    display: block;
}

.rfcc-card-validation small {
    max-width: 128px;
    color: #7f5363;
    font-size: .64rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rfcc-card-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px 22px;
    background:
        radial-gradient(circle at right bottom, rgba(255,255,255,.32), transparent 28%),
        linear-gradient(135deg, rgba(255, 215, 227, .92), rgba(236, 129, 158, .72));
    border-top: 1px solid rgba(216, 85, 117, .20);
}

.rfcc-card-sync-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #a43c5b;
    background: rgba(255,255,255,.46);
    font-size: 1.8rem;
    font-weight: 900;
}

.rfcc-card-footer span,
.rfcc-card-footer strong {
    display: block;
    color: #9f3857;
}

.rfcc-card-footer span {
    font-weight: 800;
    font-size: .86rem;
}

.rfcc-card-footer strong {
    font-size: 1.08rem;
}

.rfcc-carteirinha-offline-pill {
    width: fit-content;
    margin: 16px auto 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(216, 85, 117, .20);
    color: #a83d61;
    box-shadow: 0 12px 30px rgba(93, 38, 58, .08);
}

@media (max-width: 520px) {
    .rfcc-carteirinha-screen {
        padding-left: 12px;
        padding-right: 12px;
    }

    .rfcc-card-header {
        padding: 20px 18px 8px;
    }

    .rfcc-card-logo {
        width: 92px;
        height: 92px;
    }

    .rfcc-card-person {
        grid-template-columns: 96px 1fr;
        gap: 14px;
        padding: 8px 18px 16px;
    }

    .rfcc-card-photo-frame {
        width: 96px;
        height: 96px;
    }

    .rfcc-card-divider {
        margin: 0 18px;
    }

    .rfcc-card-content {
        grid-template-columns: 1fr 112px;
        padding: 18px;
        gap: 10px;
    }

    .rfcc-card-field {
        grid-template-columns: 36px 1fr;
        gap: 9px;
    }

    .rfcc-card-field-icon {
        width: 34px;
        height: 34px;
    }

    .rfcc-card-field span {
        font-size: .66rem;
    }

    .rfcc-card-field strong {
        font-size: .91rem;
    }

    .rfcc-card-qr {
        width: 106px;
        height: 106px;
        border-radius: 16px;
    }

    .rfcc-card-validation-text {
        font-size: .78rem;
    }

    .rfcc-card-footer {
        padding: 16px 18px 18px;
    }
}

@media (max-width: 390px) {
    .rfcc-card-content {
        grid-template-columns: 1fr;
    }

    .rfcc-card-validation {
        grid-template-columns: 108px 1fr;
        justify-items: start;
        align-items: center;
    }

    .rfcc-card-validation small {
        grid-column: 1 / -1;
        max-width: 100%;
    }
}
