.hot-pagamento-cartao-layout {
    justify-content: center;
}

.hot-pagamento-cartao-formulario {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-pagamento-cartao-formulario .form-group {
    margin-bottom: 0;
}

.hot-pagamento-cartao-formulario > .row.g-3 {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.hot-pagamento-cartao-formulario > .row.g-3 > [class*='col-']:first-child {
    padding-left: 0;
}

.hot-pagamento-cartao-formulario > .row.g-3 > [class*='col-']:last-child {
    padding-right: 0;
}

.hot-pagamento-cartao-formulario > .row.g-3 > [class*='col-'] .hot-assinatura-input-group,
.hot-pagamento-cartao-formulario > .row.g-3 > [class*='col-'] .hot-assinatura-input-group .form-control,
.hot-pagamento-cartao-formulario > .row.g-3 > [class*='col-'] .hot-assinatura-input-group .hot-login-input {
    width: 100%;
}

.hot-pagamento-bandeiras-aceitas {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: -4px 0 0;
    padding-left: 2px;
}

.hot-pagamento-bandeiras-aceitas img {
    display: block;
    height: 16px;
    width: auto;
    filter: grayscale(100%) brightness(0.55);
}

.hot-pagamento-cartao-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 248px;
    padding: 8px 4px 12px;
    overflow: visible;
}

.hot-cartao-visual {
    perspective: 1200px;
    -webkit-perspective: 1200px;
    width: 100%;
    max-width: 400px;
    padding: 4px;
    overflow: visible;
}

.hot-cartao-visual--personalizado {
    --hot-cartao-cor-primaria: #6c757d;
    --hot-cartao-cor-escura: #343a40;
    --hot-cartao-fundo-suave: rgba(108, 117, 125, 0.1);
    --hot-cartao-cor-linha: rgba(108, 117, 125, 0.35);
    --hot-cartao-faixa-magnetica: rgba(108, 117, 125, 0.22);
}

.hot-cartao-visual-inner {
    position: relative;
    width: 100%;
    height: 236px;
    transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.hot-cartao-visual.flipped .hot-cartao-visual-inner {
    transform: rotateY(180deg);
}

.hot-cartao-frente,
.hot-cartao-verso {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    border-radius: 20px;
    padding: 24px 26px;
    color: var(--hot-cartao-cor-escura);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-shadow: none;
    overflow: hidden;
    border: 1px solid var(--hot-cartao-cor-primaria);
    background: var(--hot-cartao-fundo-suave);
}

.hot-cartao-frente {
    transform: rotateY(0deg) translateZ(2px);
    -webkit-transform: rotateY(0deg) translateZ(2px);
}

.hot-cartao-verso {
    transform: rotateY(180deg) translateZ(2px);
    -webkit-transform: rotateY(180deg) translateZ(2px);
}

.hot-cartao-topo {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.hot-cartao-topo-direita {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.hot-cartao-contactless {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--hot-cartao-cor-primaria);
    background: var(--hot-cartao-fundo-suave);
    color: var(--hot-cartao-cor-primaria);
    font-size: 0.85rem;
    transform: rotate(90deg);
}

.hot-cartao-chip {
    position: relative;
    width: 48px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid var(--hot-cartao-cor-primaria);
    background: var(--hot-cartao-fundo-suave);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0 8px;
}

.hot-cartao-chip span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: var(--hot-cartao-cor-linha);
}

.hot-cartao-chip span:nth-child(2) {
    width: 70%;
}

.hot-cartao-bandeira {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 24px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.hot-cartao-bandeira .fab {
    font-size: 2rem;
    line-height: 1;
    color: var(--hot-cartao-cor-primaria);
}

.hot-cartao-bandeira img {
    display: block;
    height: 22px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.55);
}

.hot-cartao-bandeira-texto {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hot-cartao-cor-primaria);
}

.hot-cartao-bandeira--verso {
    position: absolute;
    bottom: 24px;
    right: 26px;
}

.hot-cartao-numero {
    position: relative;
    font-family: 'SF Mono', 'Roboto Mono', 'Courier New', monospace;
    font-size: clamp(0.95rem, 2.8vw, 1.28rem);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    min-height: 1.6rem;
    white-space: nowrap;
    overflow: visible;
    color: var(--hot-cartao-cor-escura);
}

.hot-cartao-numero.hot-cartao-numero--amex {
    font-size: 1.12rem;
    letter-spacing: 0.1em;
}

.hot-cartao-rodape {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.hot-cartao-rodape-bloco small {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hot-cartao-cor-primaria);
    opacity: 0.85;
    margin-bottom: 4px;
}

.hot-cartao-texto-preview {
    font-family: 'SF Mono', 'Roboto Mono', 'Courier New', monospace;
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-height: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    color: var(--hot-cartao-cor-escura);
}

.hot-cartao-rodape-bloco--validade {
    text-align: right;
    flex-shrink: 0;
}

.hot-cartao-rodape-bloco--validade .hot-cartao-texto-preview {
    max-width: none;
}

.hot-cartao-categoria {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hot-cartao-cor-primaria);
    opacity: 0.85;
}

.hot-cartao-magnetic {
    position: relative;
    height: 46px;
    margin: 6px -26px 28px;
    background: var(--hot-cartao-faixa-magnetica);
    box-shadow: none;
}

.hot-cartao-cvv-bloco {
    position: relative;
    text-align: right;
    padding-right: 4px;
}

.hot-cartao-cvv-bloco small {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hot-cartao-cor-primaria);
    opacity: 0.85;
    margin-bottom: 6px;
}

.hot-cartao-cvv-valor {
    display: inline-block;
    min-width: 76px;
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid var(--hot-cartao-cor-primaria);
    background: var(--hot-cartao-fundo-suave);
    color: var(--hot-cartao-cor-escura);
    font-family: 'SF Mono', 'Roboto Mono', 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-align: center;
    box-shadow: none;
}

.hot-pagamento-campos-cartao .form-group {
    margin-bottom: 0;
}

.hot-pagamento-cartao-formulario .hot-assinatura-input-group {
    position: relative;
}

.hot-pagamento-cartao-formulario .hot-assinatura-input-group .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
    pointer-events: none;
    line-height: 1;
    font-size: 1rem;
}

.hot-pagamento-cartao-formulario .hot-assinatura-input-group:focus-within .input-icon {
    color: #6c757d;
}

.hot-pagamento-cartao-formulario .hot-assinatura-input-group .form-control,
.hot-pagamento-cartao-formulario .hot-assinatura-input-group .hot-login-input {
    position: relative;
    z-index: 1;
    padding: 12px 12px 12px 40px;
    min-height: 44px;
}

.hot-pagamento-cartao-formulario .hot-assinatura-input-group + .invalid-feedback,
.hot-pagamento-cartao-formulario .form-group > .invalid-feedback {
    display: none;
    font-size: 0.875rem;
    margin-top: 0.35rem;
}

.hot-pagamento-cartao-formulario .hot-assinatura-input-group + .invalid-feedback.d-block,
.hot-pagamento-cartao-formulario .form-group > .invalid-feedback.d-block {
    display: block;
}

.hot-pagamento-cartao-formulario .hot-login-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

@media (max-width: 768px) {
    .hot-pagamento-cartao-preview {
        min-height: 248px;
        margin-top: 8px;
        padding-bottom: 12px;
        overflow: visible;
    }

    .hot-cartao-visual {
        max-width: 320px;
    }
}

@media (max-width: 575.98px) {
    .hot-pagamento-cartao-preview {
        min-height: 220px;
        padding: 4px 0 8px;
    }
}
