/* ======================================================
   ESTILOS PARA MÓDULO DE PAGAMENTO - MOD_PAGAMENTO.PHP
   ====================================================== */

/* Container principal de seleção de pagamento */
.payment-selection-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border-radius: 12px;
    padding: 30px 20px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Centralização dos botões de pagamento em linha */
.payment-selection-container .row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.center-block {
    float: none !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

.payment-selection-container .col-md-4 {
    flex: 0 0 auto;
    padding: 0 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.payment-selection-container h3 {
    color: #154597;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 24px;
}

.payment-selection-container p {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 25px;
}

/* Botões de método de pagamento */
.payment-method-button {
    background: white;
    border: 3px solid #e9ecef !important;
    border-radius: 12px;
    padding: 25px 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none !important;
    width: 100%;
    max-width: 280px;
    min-width: 200px;
    box-sizing: border-box;
    pointer-events: auto !important; /* Garante que o elemento aceite cliques */
    z-index: 2; /* Acima do pseudo-elemento */
}

/* Garantia específica para os IDs dos botões de pagamento */
#btPix, #btBoleto, #btCartao {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
}

.payment-method-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #e3aa29 !important;
    text-decoration: none !important;
    color: inherit;
}

.payment-method-button.btn-primary {
    background: linear-gradient(135deg, #154597 0%, #1a4a8a 100%) !important;
    border-color: #154597 !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(21, 69, 151, 0.3);
}

.payment-method-button.btn-primary:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(21, 69, 151, 0.4);
}

/* Ícone dourado quando selecionado */
.payment-method-button.btn-primary i {
    color: #e3aa29 !important;
}

.payment-method-button dt {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: inherit;
    position: relative;
    z-index: 1; /* Garante que o texto fique acima do pseudo-elemento */
}

/* Texto branco quando selecionado */
.payment-method-button.btn-primary dt {
    color: white !important;
}

.payment-method-button i {
    font-size: 80px !important;
    opacity: 0.8;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1; /* Garante que o ícone fique acima do pseudo-elemento */
}

.payment-method-button:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* Ícones específicos com cores sóbrias */
.payment-method-button:not(.btn-primary) .fa-barcode {
    color: #6c757d;
}

.payment-method-button:not(.btn-primary) .fa-credit-card {
    color: #495057;
}

.payment-method-button:not(.btn-primary) .fa-qrcode {
    color: #6c757d;
}

/* Efeito de ondulação nos botões */
.payment-method-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(227, 170, 41, 0.1);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
    pointer-events: none; /* Permite cliques através do pseudo-elemento */
    z-index: 0;
}

.payment-method-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Melhorias nos alertas do módulo de pagamento */
.payment-selection-container .alert,
#divBoleto.alert,
#divCartao .alert,
#divPix.alert,
#loading.alert,
#success.alert,
#error.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.payment-selection-container .alert-info,
#divBoleto.alert-info,
#divPix.alert-info,
#loading.alert-info {
    background: linear-gradient(135deg, #e8f1fd 0%, #dae8f7 100%);
    color: #154597;
    border-left: 4px solid #154597;
}

.payment-selection-container .alert-success,
#success.alert-success {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border-left: 4px solid #e3aa29;
}

.payment-selection-container .alert-warning {
    background: linear-gradient(135deg, #fdf8e8 0%, #f9f1d9 100%);
    color: #8b6914;
    border-left: 4px solid #e3aa29;
}

.payment-selection-container .alert-danger,
#error.alert-danger {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    border-left: 4px solid #dc3545;
}

/* Classe específica para botões de ação de pagamento */
.btn-payment-action {
    background: linear-gradient(135deg, #e3aa29 0%, #d4981f 100%) !important;
    border-color: #e3aa29 !important;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff !important;
}

.btn-payment-action:hover {
    background: linear-gradient(135deg, #d4981f 0%, #c58b1a 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 170, 41, 0.4);
    color: #fff !important;
    border-color: #d4981f !important;
}

/* Botões de ação específicos do módulo de pagamento */
#btPagamentoBoleto,
#btPagamentoCartao,
#btPagamentoPix {
    background: linear-gradient(135deg, #e3aa29 0%, #d4981f 100%) !important;
    border-color: #e3aa29 !important;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff !important;
}

#btPagamentoBoleto:hover,
#btPagamentoCartao:hover,
#btPagamentoPix:hover {
    background: linear-gradient(135deg, #d4981f 0%, #c58b1a 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 170, 41, 0.4);
    color: #fff !important;
    border-color: #d4981f !important;
}

/* Classe específica para botões de sucesso do módulo de pagamento */
.btn-payment-success {
    background: linear-gradient(135deg, #154597 0%, #1a4a8a 100%) !important;
    border-color: #154597 !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #fff !important;
}

.btn-payment-success:hover {
    background: linear-gradient(135deg, #1a4a8a 0%, #1e4f93 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 69, 151, 0.3);
    color: #fff !important;
    border-color: #1a4a8a !important;
}

/* Loading e mensagens de status */
#loading {
    border-radius: 8px;
    background: linear-gradient(135deg, #e8f1fd 0%, #dae8f7 100%);
    border: none;
    border-left: 4px solid #154597;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* QR Code container */
#pixQrCodeAlert {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

/* Responsividade para módulo de pagamento */
@media (max-width: 768px) {
    .payment-method-button {
        margin-bottom: 15px;
        min-height: 150px;
        padding: 20px 10px;
        max-width: 200px;
    }

    .payment-method-button i {
        font-size: 60px !important;
    }

    .payment-method-button dt {
        font-size: 16px;
    }

    .payment-selection-container {
        padding: 20px 15px;
    }

    .payment-selection-container h3 {
        font-size: 20px;
    }

    /* Em mobile, continua centralizando mas permite quebra de linha */
    .payment-selection-container .row {
        justify-content: center;
        margin: 0 -10px;
    }

    .payment-selection-container .col-md-4 {
        padding: 0 10px;
        flex: 0 0 auto;
        min-width: 200px;
        max-width: 250px;
    }
}

/* ======================================================
   ESTILOS PARA CARTÕES DE CRÉDITO MODERNOS - UNYCLUB
   ====================================================== */

/* Cartão principal */
.card-modern {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-modern.selected {
    border-color: #5cb85c !important;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.4) !important;
    background-color: #f8fff8 !important;
    transform: translateY(-3px) !important;
}

/* Container da marca do cartão */
.card-brand-container {
    height: 30px;
    margin-bottom: 10px;
}

.card-brand-img {
    max-height: 30px;
    max-width: 80px;
    object-fit: contain;
}

/* Número do cartão */
.card-number h4 {
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    font-size: 16px;
    font-weight: bold;
}

/* Informações do cartão */
.card-info {
    margin-top: 15px;
}

.info-row {
    margin-bottom: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.info-label {
    color: #7f8c8d;
    font-weight: normal;
    min-width: 70px;
}

.info-value {
    color: #2c3e50;
    font-weight: 500;
    margin-left: 5px;
    flex: 1;
}

/* Radio visual personalizado */
.radio-visual {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.radio-circle {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: white;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.radio-circle.active {
    border-color: #5cb85c;
    background: #5cb85c;
}

.radio-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.radio-circle.active .radio-check {
    opacity: 1;
}

/* Ações do cartão */
.card-actions {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 15px;
}

/* Labels especiais */
.label-primary {
    background-color: #5cb85c;
}

/* Melhorias para responsividade */
@media (max-width: 768px) {
    .card-modern {
        margin-bottom: 20px;
    }

    .card-number h4 {
        font-size: 14px;
    }

    .info-row {
        font-size: 12px;
    }

    .card-brand-container {
        height: 25px;
    }

    .card-brand-img {
        max-height: 25px;
        max-width: 70px;
    }
}

/* Estados especiais */
.card-modern.card-expired {
    opacity: 0.7;
    cursor: not-allowed;
}

.card-modern.card-expired:hover {
    transform: none;
    box-shadow: none;
}

/* Animações de entrada */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-modern {
    animation: cardFadeIn 0.5s ease-out;
}

/* Melhorias no formulário */
#formCard .panel-heading {
    background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
    border-color: #4cae4c;
}

#formCard .panel-title {
    color: white;
}

/* Botão fechar personalizado */
#btRemoveFormCard {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    transition: all 0.3s ease;
}

#btRemoveFormCard:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    color: white;
}
