/**
 * ArmPay Frontend Styles
 */

.armpay-payment-form {
    margin-bottom: 20px;
}

.armpay-payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.armpay-payment-method {
    flex: 1;
    min-width: 200px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.armpay-payment-method:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.armpay-payment-method input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.armpay-payment-method input[type="radio"]:checked + label {
    font-weight: bold;
}

.armpay-payment-method input[type="radio"]:checked + label:before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 2px solid #2271b1;
    border-radius: 5px;
    pointer-events: none;
}

.armpay-payment-method label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.armpay-payment-method label img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.armpay-payment-method-description {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.armpay-credit-card-form {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.armpay-credit-card-form .form-row {
    margin-bottom: 15px;
}

.armpay-credit-card-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.armpay-credit-card-form input,
.armpay-credit-card-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.armpay-payment-success {
    margin: 30px 0;
    text-align: center;
}

.armpay-payment-instructions {
    margin-bottom: 20px;
}

.armpay-qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.armpay-qrcode-image {
    margin-bottom: 20px;
}

.armpay-qrcode-image img {
    max-width: 250px;
    height: auto;
}

.armpay-qrcode-copy {
    width: 100%;
    max-width: 400px;
}

.armpay-copy-code {
    position: relative;
}

.armpay-copy-code textarea {
    width: 100%;
    height: 60px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    font-size: 12px;
}

.armpay-copy-button {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 10px;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.armpay-payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.armpay-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: armpay-spin 1s linear infinite;
}

@keyframes armpay-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para o indicador de carregamento */
.armpay-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.armpay-loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2271b1;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: armpay-spin 1s linear infinite;
    margin-bottom: 20px;
}

.armpay-loading-text {
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

@keyframes armpay-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para o formulário de cartão */
.armpay-card-error {
    border-color: #dc3232 !important;
}

.armpay-card-valid {
    border-color: #46b450 !important;
}

/* Controle de visibilidade do formulário de cartão de crédito */
#armpay_credit_card_form {
    display: none !important;
}

.armpay-credit-card-active #armpay_credit_card_form {
    display: block !important;
}

/* Estilos para os métodos de pagamento */
.armpay-payment-methods {
    margin-bottom: 20px;
}

.armpay-payment-method {
    margin-bottom: 10px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f8f8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.armpay-payment-method:hover {
    background-color: #f0f0f0;
}

.armpay-payment-method.active {
    border-color: #2271b1;
    background-color: #f0f7ff;
}

.armpay-payment-method label {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.armpay-payment-method label img {
    margin-right: 10px;
    width: 32px;
    height: auto;
}
.woocommerce-thankyou-order-details {
    display: none !important;
}
.woocommerce-order-details {
    display: none !important;
}
.woocommerce-customer-details {
    display: none !important;
}

/* Oculta o título e a imagem do gateway */
.payment_method_armpay > label {
    display: none !important;
}

/* Oculta a descrição do gateway */
.payment_method_armpay > .payment_box > p:first-child {
    display: none !important;
}

/* Remove o padding/margin extra que pode ficar */
.payment_method_armpay {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.payment_method_armpay .payment_box {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Mantém o radio button funcional mas invisível */
.payment_method_armpay > input[type="radio"] {
    position: absolute;
    opacity: 0;
}

#armpay-pix-approved-modal {
        display: none;
        position: fixed;
        z-index: 9999;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0,0,0,0.4);
    }
    
    .armpay-modal-content {
        background-color: #fff;
        margin: 15% auto;
        padding: 25px;
        border-radius: 8px;
        width: 90%;
        max-width: 500px;
        text-align: center;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        animation: modalFadeIn 0.3s ease-out;
    }
    
    .armpay-modal-logo {
        margin-bottom: 20px;
    }
    
    .armpay-modal-logo img {
        max-width: 150px;
        max-height: 80px;
        object-fit: contain;
    }
    
    .armpay-modal-title {
        color: #00B44A;
        margin-top: 0;
        font-size: 24px;
        font-weight: 600;
    }
    
    .armpay-modal-message {
        font-size: 16px;
        color: #333;
        margin-bottom: 20px;
        line-height: 1.5;
    }
    
    .armpay-modal-redirect {
        font-size: 14px;
        color: #666;
    }
    
    .armpay-modal-button {
        margin-top: 30px;
    }
    
    .armpay-modal-button button {
        padding: 10px 25px;
        background-color: #00B44A;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 16px;
        transition: background-color 0.2s;
    }
    
    .armpay-modal-button button:hover {
        background-color: #009940;
    }
    
    @keyframes modalFadeIn {
        from {opacity: 0; transform: translateY(-20px);}
        to {opacity: 1; transform: translateY(0);}
    }