/* Estilos para Wallet */

/* Componente de Wallet */
.wallet-component {
    display: flex;
    align-items: center;
    background-color: rgba(0, 66, 0, 0.8);
    border-radius: 10px;
    padding: 8px 12px;
    margin-right: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Nova classe para agrupar a wallet com o perfil */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-wallet {
    margin: 0 10px;
    position: relative;
}

.wallet-balance {
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}

.balance-label {
    font-size: 10px;
    color: #b4ffb4;
    opacity: 0.9;
}

.balance-amount {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #ffffff;
}

#mobile-balance-value,
#desktop-balance-value {
    margin-right: 5px;
    font-size: 16px;
}

.currency {
    font-size: 14px;
    opacity: 0.9;
}

.add-funds-btn {
    background: none;
    border: none;
    color: #4cff4c;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 5px;
    transition: transform 0.2s;
}

.add-funds-btn:hover {
    transform: scale(1.1);
    color: #80ff80;
}

/* Ajustes para Mobile */
@media (max-width: 768px) {
    .mobile-wallet {
        scale: 0.85;
        margin-right: 5px;
    }
    
    #mobile-balance-value {
        font-size: 14px;
    }
    
    .currency {
        font-size: 12px;
    }
    
    .add-funds-btn {
        font-size: 16px;
    }
}

/* Modais */

/* Estilos gerais para modais */
.deposit-modal,
.purchase-modal,
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.deposit-modal-content,
.purchase-modal-content,
.success-modal-content {
    background-color: #1a1a1a;
    border-radius: 10px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modal-fade-in 0.3s ease-out forwards;
}

.deposit-modal-header,
.purchase-modal-header,
.success-modal-header {
    padding: 15px 20px;
    background-color: #004200;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #006600;
}

.deposit-modal-header h3,
.purchase-modal-header h3,
.success-modal-header h3 {
    color: white;
    font-size: 18px;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
}

.close-modal:hover {
    transform: scale(1.1);
}

.deposit-modal-body,
.purchase-modal-body,
.success-modal-body {
    padding: 20px;
    color: #d4d4d4;
}

/* Estilos específicos do Modal de Depósito */
.deposit-option-header,
.payment-method-header {
    margin-bottom: 15px;
}

.deposit-option-header h4,
.payment-method-header h4 {
    font-size: 16px;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.deposit-amount-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.deposit-amount-btn {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #006600;
    background-color: #004200;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1 0 calc(33.333% - 10px);
    text-align: center;
    min-width: 80px;
}

.deposit-amount-btn:hover,
.payment-method-btn:hover {
    background-color: #008800;
}

.deposit-amount-btn.active,
.payment-method-btn.active {
    background-color: #009900;
    border-color: #00cc00;
    box-shadow: 0 0 8px rgba(0, 204, 0, 0.4);
}

.custom-amount-container {
    margin-bottom: 20px;
}

.custom-amount-container label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
}

.custom-amount-input {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-prefix {
    position: absolute;
    left: 10px;
    color: #c0c0c0;
}

#custom-amount {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border-radius: 6px;
    border: 1px solid #006600;
    background-color: #1a1a1a;
    color: white;
}

.payment-method-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.payment-method-btn {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #006600;
    background-color: #004200;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    flex: 1;
}

.payment-method-btn i {
    margin-right: 8px;
    font-size: 16px;
}

.pix-container {
    background-color: #242424;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

#pix-instructions p {
    margin: 0 0 10px 0;
    color: #c0c0c0;
    font-size: 14px;
}

.generate-pix-btn {
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    background-color: #006600;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 10px;
}

.generate-pix-btn:hover {
    background-color: #008800;
}

.pix-qrcode {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.qr-code-placeholder {
    width: 200px;
    height: 200px;
    background-color: #333;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-code-placeholder:after {
    content: "QR Code PIX";
    color: #999;
    font-size: 16px;
}

.qr-code-placeholder:before {
    content: "";
    position: absolute;
    width: 60%;
    height: 60%;
    border: 10px solid #555;
    border-radius: 10px;
}

.pix-code h5 {
    font-size: 14px;
    margin: 0 0 10px 0;
    color: white;
}

.pix-code-text {
    position: relative;
    margin-bottom: 15px;
}

#pix-code-text {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #006600;
    background-color: #1a1a1a;
    color: white;
    resize: none;
    height: 60px;
}

.copy-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    background-color: #006600;
    border: none;
    border-radius: 4px;
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: #008800;
}

.pix-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.pix-status p {
    margin: 0;
    color: #c0c0c0;
}

.pix-timer {
    display: flex;
    align-items: center;
    color: #ffcc00;
}

.pix-timer i {
    margin-right: 5px;
}

/* Estilos específicos do Modal de Compra */
.purchase-details {
    background-color: #242424;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.product-info h4 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: white;
}

.product-price {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 15px;
}

.wallet-info {
    margin-top: 15px;
}

.wallet-balance, .balance-after {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.insufficient-funds {
    background-color: #5c0000;
    border-radius: 6px;
    padding: 10px 15px;
    margin-top: 15px;
}

.insufficient-funds p {
    color: #ffcccc;
    margin: 0 0 10px 0;
}

.add-funds-btn-modal {
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    background-color: #880000;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-funds-btn-modal:hover {
    background-color: #aa0000;
}

.confirm-purchase-btn {
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    background-color: #006600;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.confirm-purchase-btn:hover {
    background-color: #008800;
}

.confirm-purchase-btn:disabled {
    background-color: #444;
    cursor: not-allowed;
}

/* Estilos específicos do Modal de Sucesso */
.success-icon {
    text-align: center;
    font-size: 60px;
    color: #00cc00;
    margin: 10px 0 20px;
}

.success-message {
    text-align: center;
    margin-bottom: 20px;
}

.product-details {
    background-color: #242424;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.product-details h4 {
    color: white;
    margin: 0 0 10px 0;
}

.product-details p {
    margin: 5px 0;
    color: #c0c0c0;
}

.success-actions {
    display: flex;
    gap: 10px;
}

.view-products-btn, .continue-shopping-btn {
    padding: 12px 15px;
    border-radius: 6px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 1;
    text-align: center;
}

.view-products-btn {
    background-color: #006600;
    color: white;
}

.view-products-btn:hover {
    background-color: #008800;
}

.continue-shopping-btn {
    background-color: #333;
    color: white;
}

.continue-shopping-btn:hover {
    background-color: #444;
}

/* Animações */
@keyframes modal-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustes para Mobile */
@media (max-width: 576px) {
    .deposit-modal-content,
    .purchase-modal-content,
    .success-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .deposit-amount-btn {
        flex: 1 0 calc(50% - 10px);
    }
}

.site-title a, .site-title-mobile a, .footer-brand a {
    color: inherit; /* Mantém a cor original */
    text-decoration: none; /* Remove o sublinhado padrão */
}
.site-title a:hover, .site-title-mobile a:hover, .footer-brand a:hover {
    text-decoration: underline; /* Adiciona sublinhado ao passar o mouse, opcional */
}

/* =========================================================
   OVERRIDES — SOMENTE para o modal de DEPÓSITO (PIX)
   (não afetam purchase-modal nem success-modal)
   =======================================================*/

/* Overlay do depósito com respiro nas bordas */
.deposit-modal {
  padding: 16px;
}

/* Container do depósito: limita altura e vira coluna */
.deposit-modal-content {
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

/* Header do depósito sempre visível ao rolar (X acessível) */
.deposit-modal-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Corpo do depósito rola por dentro do modal */
.deposit-modal-body {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* QR code responsivo apenas no depósito */
.deposit-modal-body .pix-qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.deposit-modal-body .pix-qrcode img,
.deposit-modal-body .pix-qrcode canvas,
.deposit-modal-body .qr-code-placeholder {
  max-width: 100%;
  width: min(70vw, 280px);
  height: auto !important;
}

.deposit-modal-body .qr-code-placeholder {
  aspect-ratio: 1 / 1;
}

/* Textarea do código PIX controlada somente no depósito */
.deposit-modal-body #pix-code-text {
  resize: vertical;
  min-height: 60px;
  max-height: 120px;
}

/* Mobile: ajustes só para o depósito */
@media (max-width: 576px) {
  .deposit-modal-content {
    max-height: 92vh;
    width: 100%;
    border-radius: 10px;
  }
  .deposit-modal-body {
    padding: 16px;
  }
  .deposit-modal-body .pix-qrcode img,
  .deposit-modal-body .pix-qrcode canvas,
  .deposit-modal-body .qr-code-placeholder {
    width: min(84vw, 220px);
  }
}
