/* Patch mobile Carteirinha Digital
   Inclua este arquivo depois do carteirinha.css no index.html
   ou cole este conteúdo no final do wwwroot/css/carteirinha.css */

@media (max-width: 520px) {
    .rfcc-carteirinha-screen {
        position: fixed;
        inset: 0;
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        overflow-y: auto;
        padding: max(10px, env(safe-area-inset-top)) 8px max(14px, env(safe-area-inset-bottom));
        box-sizing: border-box;
    }

    .rfcc-carteirinha-appbar {
        width: 100%;
        max-width: 390px;
        grid-template-columns: 42px 1fr 42px;
        gap: 8px;
        margin-bottom: 10px;
    }

    .rfcc-carteirinha-icon-btn,
    .rfcc-carteirinha-nfc {
        width: 40px;
        height: 40px;
    }

    .rfcc-carteirinha-title strong {
        font-size: 1rem;
    }

    .rfcc-carteirinha-title span {
        font-size: .82rem;
    }

    .rfcc-digital-card {
        width: 100%;
        max-width: 390px;
        border-radius: 22px;
    }

    .rfcc-card-header {
        padding: 14px 16px 8px;
        gap: 10px;
    }

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

    .rfcc-card-header-text strong {
        font-size: .86rem;
    }

    .rfcc-card-header-text span,
    .rfcc-card-header-text small {
        font-size: .62rem;
    }

    .rfcc-card-rose-mark {
        top: 54px;
        right: 14px;
        font-size: 5.4rem;
    }

    .rfcc-card-person {
        grid-template-columns: 82px 1fr;
        gap: 12px;
        padding: 6px 16px 14px;
    }

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

    .rfcc-card-photo-placeholder {
        font-size: 1.8rem;
    }

    .rfcc-card-name-box strong {
        font-size: 1.28rem;
        line-height: 1.05;
        word-break: normal;
        overflow-wrap: break-word;
    }

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

    .rfcc-card-content {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 14px;
    }

    .rfcc-card-fields {
        gap: 10px;
    }

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

    .rfcc-card-field-icon {
        width: 32px;
        height: 32px;
        font-size: .78rem;
    }

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

    .rfcc-card-field strong {
        font-size: .88rem;
        line-height: 1.12;
    }

    .rfcc-card-status {
        min-height: 26px;
        padding: 0 12px;
        font-size: .86rem;
    }

    .rfcc-card-validation {
        width: 100%;
        display: grid;
        grid-template-columns: 112px 1fr;
        align-items: center;
        justify-items: start;
        gap: 10px 12px;
        margin-top: 2px;
    }

    .rfcc-card-qr {
        width: 104px;
        height: 104px;
        padding: 8px;
        border-radius: 15px;
    }

    .rfcc-card-validation-text {
        text-align: left;
        font-size: .78rem;
        line-height: 1.1;
    }

    .rfcc-card-validation small {
        grid-column: 1 / -1;
        max-width: 100%;
        padding-left: 2px;
        font-size: .62rem;
    }

    .rfcc-card-footer {
        padding: 14px 16px 16px;
        gap: 10px;
    }

    .rfcc-card-sync-icon {
        width: 38px;
        height: 38px;
        font-size: 1.45rem;
    }

    .rfcc-card-footer span {
        font-size: .76rem;
    }

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

    .rfcc-carteirinha-offline-pill {
        margin-top: 12px;
        min-height: 34px;
        font-size: .86rem;
    }
}

@media (max-width: 360px) {
    .rfcc-card-logo {
        width: 70px;
        height: 70px;
    }

    .rfcc-card-person {
        grid-template-columns: 76px 1fr;
    }

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

    .rfcc-card-name-box strong {
        font-size: 1.16rem;
    }

    .rfcc-card-validation {
        grid-template-columns: 98px 1fr;
    }

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