/* Estilos da Carteira Digital Unimed Ceará - Design Oficial */

/* === BOTÃO COPIAR CARTEIRA === */
.btn-copiar-carteira {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.btn-copiar-carteira:hover {
    background: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.btn-copiar-carteira svg {
    flex-shrink: 0;
}

.btn-copiar-carteira:active {
    transform: translateY(0);
}

/* === CONTAINER PRINCIPAL === */
.lista-carteiras {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    padding: 0 10px;
}

/* === CARTÃO PRINCIPAL === */
.carteira-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    margin: 10px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    max-width: 800px; /* Aumentado de 500px para 800px */
    width: 100%;
    font-family: 'Arial', sans-serif;
    border: none;
    min-height: 350px; /* Adiciona altura mínima */
}

.carteira-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.carteira-card.selected,
.carteira-card.selecionada {
    border: 3px solid #00a651;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 166, 81, 0.2);
}

/* === CABEÇALHO VERDE === */
.carteira-header {
    background: linear-gradient(135deg, #00a651 0%, #008f47 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-radius: 15px 15px 0 0;
    min-height: 60px;
}

.unimed-logo {
    height: 50px;
    width: auto;
    opacity: 1;
}

.header-natureza {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    line-height: 1.3;
    max-width: 60%;
}

/* Remover estilos antigos não utilizados */
.unimed-title,
.unimed-location,
.unimed-subtitle {
    display: none;
}

.carteira-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(135deg, #a8d5ba 0%, #7bc142 100%);
}

/* === CONTEÚDO AMARELO/VERDE === */
.carteira-content {
    background: linear-gradient(135deg, #f4f7a8 0%, #c8e6a0 100%);
    padding: 20px;
    color: #2d5016;
    position: relative;
}

.carteira-info-principal {
    margin-bottom: 15px;
}

.carteira-numero {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.4);
    padding: 10px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.beneficiario-nome {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.beneficiario-titulo {
    font-size: 11px;
    text-align: center;
    margin-bottom: 20px;
    color: #4a6741;
    font-weight: 500;
}

/* === GRID DE INFORMAÇÕES === */
.plano-detalhes {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Alterado para 3 colunas */
    gap: 0;
    margin-top: 15px;
}

.detalhe-item {
    display: flex;
    flex-direction: column;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(77, 103, 65, 0.2);
    position: relative;
}

.detalhe-item:not(:nth-child(3n)) { /* Borda direita para todos exceto a cada 3º */
    border-right: 1px solid rgba(77, 103, 65, 0.2);
    padding-right: 15px;
}

.detalhe-item:nth-child(3n-1), /* Segundo da linha */
.detalhe-item:nth-child(3n-2) { /* Primeiro da linha */
    padding-left: 8px;
    padding-right: 15px;
}

.detalhe-item:nth-child(3n) { /* Terceiro da linha - sem borda direita */
    padding-left: 15px;
}

.detalhe-valor {
    font-size: 15px;
    font-weight: 800;
    color: #2d5016;
    margin-bottom: 2px;
    text-transform: uppercase;
    line-height: 1.1;
}

.detalhe-label {
    font-size: 10px;
    font-weight: 600;
    color: #4a6741;
    text-transform: capitalize;
    opacity: 0.8;
}

/* === ITEM DE SEGMENTAÇÃO COMPLETA === */
.detalhe-full {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 12px 15px;
    border-top: 1px solid rgba(77, 103, 65, 0.3);
    border-right: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.detalhe-full .detalhe-label {
    font-size: 11px;
    margin: 0;
    font-weight: 600;
    display: inline;
}

.detalhe-full .detalhe-valor {
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
    display: inline;
}

/* === RESPONSIVIDADE === */
@media (max-width: 800px) {
    .plano-detalhes {
        grid-template-columns: 1fr 1fr; /* 2 colunas em telas médias */
    }
    
    .detalhe-item:not(:nth-child(2n)) { /* Borda direita para ímpares */
        border-right: 1px solid rgba(77, 103, 65, 0.2);
        padding-right: 15px;
    }
    
    .detalhe-item:nth-child(2n) { /* Pares sem borda direita */
        padding-left: 15px;
        border-right: none;
    }
    
    /* Reset regras de 3 colunas */
    .detalhe-item:nth-child(3n-1),
    .detalhe-item:nth-child(3n-2),
    .detalhe-item:nth-child(3n) {
        padding-left: 8px;
        padding-right: 8px;
    }
}

@media (max-width: 600px) {
    .carteira-card {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .plano-detalhes {
        grid-template-columns: 1fr; /* 1 coluna em mobile */
        gap: 5px;
    }
    
    .detalhe-item {
        border-right: none !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    .carteira-numero {
        font-size: 22px;
        letter-spacing: 1.5px;
    }
    
    .beneficiario-nome {
        font-size: 17px;
    }
    
    .detalhe-valor {
        font-size: 14px;
    }
}

.validade {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.validade .label {
    font-size: 12px;
    color: #666;
}

.validade .data {
    font-size: 14px;
    font-weight: bold;
    color: #2E7D5A;
}

.selecionar-btn {
    background: #2E7D5A;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.carteira-card:hover .selecionar-btn {
    background: #4A9B6E;
    transform: scale(1.05);
}

.carteira-card.selecionada .selecionar-btn {
    background: #1B5E20;
}

/* === ESTILOS ORIGINAIS DA CARTEIRA DIGITAL === */

.carteira-digital {
    max-width: 380px;
    margin: 20px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2E7D5A 0%, #4A9B6E 100%);
}

.carteira-header {
    background: linear-gradient(135deg, #2E7D5A 0%, #4A9B6E 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.carteira-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.unimed-logo {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.unimed-ceara {
    font-size: 12px;
    opacity: 0.9;
    letter-spacing: 1px;
}

.tipo-carteira {
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 10px;
    text-align: center;
    opacity: 0.95;
}

.carteira-body {
    background: #A8D35F;
    padding: 25px;
    color: #2C5530;
    position: relative;
}

.numero-carteira {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.nome-beneficiario {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.nome-beneficiario-label {
    font-size: 11px;
    text-align: center;
    opacity: 0.8;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    align-items: flex-start;
}

.info-item {
    flex: 1;
}

.info-item:not(:last-child) {
    margin-right: 20px;
}

.info-label {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 3px;
    opacity: 0.8;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 13px;
    font-weight: bold;
    line-height: 1.3;
}

.segmentacao {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(44, 85, 48, 0.2);
}

.segmentacao .info-label {
    margin-bottom: 5px;
}

.segmentacao .info-value {
    font-size: 12px;
    line-height: 1.4;
}

.mais-info-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: #2E7D5A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mais-info-btn:hover {
    background: #1F5A3F;
    transform: scale(1.1);
}

.carteira-container {
    margin: 30px 0;
    display: none; /* Inicialmente escondida */
}

.carteira-container.show {
    display: block;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade */
@media (max-width: 480px) {
    .carteira-digital {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .numero-carteira {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .info-item:not(:last-child) {
        margin-right: 0;
    }
}