/**
 * Estilos personalizados para os shortcodes do GamiPress. Esse gamipress-custom.css está em astra-child/css/gamipress-custom.css e é do subdomínio
 */

/* Estilos gerais */
:root {
  --elune-primary: #4285f4;
  --elune-secondary: #8d00ff;
  --elune-accent: #c50491;
  --elune-success: #34a853;
  --elune-danger: #ea4335;
  --elune-light: #f5f5f5;
  --elune-dark: #333333;
  --elune-gray: #666666;
  --elune-border: #eeeeee;
  --elune-gradient: linear-gradient(135deg, #4285f4, #8d00ff, #c50491);
  --elune-radius: 8px;
  --elune-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Esconder elementos originais quando necessário */
.gamipress-points-types.elune-styled .gamipress-points-thumbnail,
.gamipress-points-types.elune-styled .gamipress-points-label {
  display: none;
}

/* Container principal para o saldo de pontos */
.elune-points-container {
  background-color: white;
  border-radius: var(--elune-radius);
  box-shadow: var(--elune-shadow);
  padding: 24px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto 24px;
}




/* Círculo gradiente para o saldo - aumentado o tamanho */
.elune-points-circle {
  width: 160px; /* Aumentado de 140px para 160px para maior destaque */
  height: 160px; /* Aumentado de 140px para 160px para maior destaque */
  border-radius: 50%;
  background: var(--elune-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
}

.elune-points-circle::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  background-color: white;
  border-radius: 50%;
  z-index: 1;
}

.elune-points-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--elune-dark);
  position: relative;
  z-index: 2;
}

.elune-points-label {
  font-size: 14px;
  color: var(--elune-gray);
  position: relative;
  z-index: 2;
}

.elune-points-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--elune-dark);
  margin-bottom: 8px;
}

.elune-points-description {
  font-size: 14px;
  color: var(--elune-gray);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Botões de ação */
.elune-points-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap; /* Alterado para nowrap para manter em linha no desktop */
}

.elune-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--elune-radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap; /* Evita quebra de linha no texto do botão */
}

.elune-btn svg {
  width: 16px;
  height: 16px;
}

.elune-btn-primary {
  background-color: #4285F4 !important;
  color: white;
}

.elune-btn-primary:hover {
  background-color: #73A7FA !important;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.4);
}

.elune-btn-secondary {
  background-color: #4285F4;
  color: white;
}

.elune-btn-secondary:hover {
  background-color: #73A7FA !important;
  box-shadow: 0 2px 8px rgba(141, 0, 255, 0.4);
}

.elune-btn-accent {
  background-color: #8D00FF;
  color: white;
}

.elune-btn-accent:hover {
  background-color: #b00482;
  box-shadow: 0 2px 8px rgba(197, 4, 145, 0.4);
}

/* Remover o sublinhado e a mudança de cor no hover dos botões */
.elune-btn-primary:hover,
.elune-btn-secondary:hover,
.elune-btn-accent:hover {
  text-decoration: none;
  color: white; /* Mantém a cor do texto branca */
}

/* Manter a sombra e o efeito de elevação para feedback visual */
.elune-btn-primary:hover {
  background-color: var(--elune-primary); /* Mantém a cor original */
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.4);
}

.elune-btn-secondary:hover {
  background-color: var(--elune-secondary); /* Mantém a cor original */
  box-shadow: 0 2px 8px rgba(141, 0, 255, 0.4);
}

.elune-btn-accent:hover {
  background-color: var(--elune-accent); /* Mantém a cor original */
  box-shadow: 0 2px 8px rgba(197, 4, 145, 0.4);
}

.elune-btn-outline {
  background-color: transparent;
  border: 1px solid var(--elune-border);
  color: var(--elune-gray);
}

.elune-btn-outline:hover {
  background-color: var(--elune-light);
}

/* Resumo de atividades e próximos níveis */
.elune-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 24px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .elune-dashboard-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

.elune-dashboard-card {
  background-color: white;
  border-radius: var(--elune-radius);
  box-shadow: var(--elune-shadow);
  padding: 20px;
}

.elune-dashboard-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--elune-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.elune-dashboard-card h3 svg {
  width: 18px;
  height: 18px;
  color: var(--elune-primary);
}

.elune-activity-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--elune-border);
}

.elune-activity-item:last-child {
  border-bottom: none;
}

.elune-activity-points {
  font-weight: 600;
  color: var(--elune-success);
}

/* Estilos para a tabela de transações */
.elune-transactions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.elune-transactions-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--elune-dark);
  margin: 0;
}

.elune-transactions-actions {
  display: flex;
  gap: 8px;
}

.elune-transactions-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: white;
  border-radius: var(--elune-radius);
  box-shadow: var(--elune-shadow);
  overflow: hidden;
  margin-bottom: 16px;
}

.elune-transactions-table thead th {
  background-color: var(--elune-light);
  color: var(--elune-gray);
  font-weight: 500;
  font-size: 14px;
  text-align: left;
  padding: 12px 16px;
}

.elune-transactions-table tbody td {
  padding: 12px 16px;
  border-top: 1px solid var(--elune-border);
  font-size: 14px;
  color: var(--elune-dark);
}

.elune-transactions-table tbody tr:hover {
  background-color: rgba(245, 245, 245, 0.5);
}

.elune-transaction-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
}

.elune-transaction-icon.positive {
  background-color: rgba(52, 168, 83, 0.1);
  color: var(--elune-success);
}

.elune-transaction-icon.negative {
  background-color: rgba(234, 67, 53, 0.1);
  color: var(--elune-danger);
}

.elune-transaction-positive .elune-transaction-value {
  color: var(--elune-success);
  font-weight: 600;
}

.elune-transaction-negative .elune-transaction-value {
  color: var(--elune-danger);
  font-weight: 600;
}

.elune-transactions-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--elune-gray);
}

.elune-pagination-buttons {
  display: flex;
  gap: 8px;
}

/* Estilos para barras de progresso */
.elune-progress-container {
  margin-bottom: 16px;
}

.elune-progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.elune-progress-label {
  font-size: 14px;
  color: var(--elune-dark);
}

.elune-progress-value {
  font-size: 14px;
  color: var(--elune-primary);
  font-weight: 600;
}

.elune-progress-bar {
  height: 8px;
  background-color: var(--elune-light);
  border-radius: 4px;
  overflow: hidden;
}

.elune-progress-fill {
  height: 100%;
  border-radius: 4px;
}

.elune-progress-fill.primary {
  background-color: var(--elune-primary);
}

.elune-progress-fill.secondary {
  background-color: var(--elune-secondary);
}

.elune-progress-fill.accent {
  background-color: var(--elune-accent);
}

/* Estilos para o shortcode de conquistas */
.elune-achievements-container {
  margin-bottom: 24px;
}

.elune-achievements-section {
  margin-bottom: 32px;
}

.elune-achievements-title {
  font-size: 18px !important;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}




.elune-achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.elune-achievement-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.elune-achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.elune-achievement-image {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.elune-achievement-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.elune-achievement-earned-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background-color: #34a853;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.elune-achievement-content {
  padding: 16px;
}

.elune-achievement-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.elune-achievement-excerpt {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.4;
}

.elune-achievement-points {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #4285f4;
  font-weight: 500;
}

.elune-achievement-points svg {
  margin-right: 6px;
  color: #4285f4;
}

.elune-achievement-locked {
  opacity: 0.7;
}

.elune-achievement-locked .elune-achievement-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Estilos para o shortcode de ranks */
.elune-ranks-container {
  margin-bottom: 24px;
}

.elune-ranks-section {
  margin-bottom: 32px;
}

.elune-ranks-title {
  font-size: 18px !important;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

.elune-ranks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.elune-rank-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.elune-rank-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.elune-rank-image {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.elune-rank-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.elune-rank-current-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background-color: #8d00ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.elune-rank-content {
  padding: 16px;
}

.elune-rank-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.elune-rank-excerpt {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.4;
}

.elune-rank-points {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #8d00ff;
  font-weight: 500;
}

.elune-rank-points svg {
  margin-right: 6px;
  color: #8d00ff;
}

.elune-rank-locked {
  opacity: 0.7;
}

.elune-rank-locked .elune-rank-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.elune-rank-current {
  border: 2px solid #8d00ff;
}

/* Estilos para o shortcode de rank do usuário */
.elune-user-rank-container {
  margin-bottom: 24px;
}

.elune-user-rank-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.elune-user-rank-image {
  width: 100px;
  height: 100px;
  margin-bottom: 16px;
}

.elune-user-rank-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.elune-user-rank-content {
  text-align: center;
  width: 100%;
}

.elune-user-rank-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.elune-user-rank-name {
  font-size: 24px;
  font-weight: 700;
  color: #8d00ff;
  margin-bottom: 12px;
}

.elune-user-rank-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.5;
}

.elune-user-rank-progress {
  width: 100%;
  margin-top: 16px;
}

/* Estilos para o shortcode de última conquista */
.elune-last-achievement-container {
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.elune-last-achievement-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
}

.elune-last-achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.elune-last-achievement-image {
  width: 100px;
  height: 100px;
  margin-bottom: 16px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.elune-last-achievement-image img {
  width: 100%;
  height: 100%;
  object-fit: contain !important; /* Forçar contain para garantir que a imagem seja exibida corretamente */
  max-width: 100% !important; /* Garantir que a imagem não ultrapasse o container */
  max-height: 100% !important; /* Garantir que a imagem não ultrapasse o container */
  transition: transform 0.3s ease;
}

.elune-last-achievement-card:hover .elune-last-achievement-image img {
  transform: scale(1.1);
}

.elune-last-achievement-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  background-color: #34a853;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid white;
}

.elune-last-achievement-badge svg {
  width: 16px;
  height: 16px;
}

.elune-last-achievement-content {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Destaque para o nome da conquista */
.elune-achievement-name-highlight {
  color: #4285f4;
  font-weight: 700;
}

/* Estilo para a descrição da conquista */
.elune-last-achievement-description {
  font-size: 14px;
  color: #666;
  margin: 8px 0 12px;
  line-height: 1.5;
  text-align: center;
}

/* Ajuste no título da última conquista */
.elune-last-achievement-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  line-height: 1.3;
}

.elune-last-achievement-name {
  font-size: 22px;
  font-weight: 700;
  color: #4285f4;
  margin-bottom: 6px;
  line-height: 1.3;
}

.elune-last-achievement-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  font-style: italic;
}

.elune-last-achievement-points {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #4285f4;
  font-weight: 600;
  background-color: #f0f6ff;
  padding: 6px 12px;
  border-radius: 20px;
  margin-top: 6px;
  width: fit-content;
  align-self: center;
}

.elune-last-achievement-points svg {
  margin-right: 6px;
  color: #4285f4;
}

/* Estilos para elementos sem imagem */
.elune-achievement-no-image,
.elune-last-achievement-no-image {
  background-color: #f0f6ff;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 12px;
}

.elune-achievement-no-image:after,
.elune-last-achievement-no-image:after {
  content: "🏆";
  font-size: 40px;
}

/* Estilos para o caso de nenhuma conquista */
.elune-no-achievements {
  border: 2px dashed #e0e0e0;
  background-color: #fafafa;
}

.elune-empty-achievement {
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.elune-empty-achievement .sad-face-icon {
  width: 60px;
  height: 60px;
  color: #aaaaaa;
}

.elune-last-achievement-message {
  color: #666;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.elune-achievement-explore-btn {
  margin-top: 10px;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 767px) {
  .elune-points-actions {
    flex-direction: column;
    width: 100%;
    flex-wrap: wrap; /* Permite quebra em dispositivos móveis */
  }

  .elune-btn {
    width: 100%;
    white-space: normal; /* Permite quebra de texto em dispositivos móveis */
  }

  .elune-transactions-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .elune-transactions-table {
    display: block;
    overflow-x: auto;
  }

  .elune-transactions-pagination {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .elune-achievements-grid,
  .elune-ranks-grid {
    grid-template-columns: 1fr !important;
  }

  .elune-site-points-grid {
    grid-template-columns: 1fr !important;
  }

  .elune-user-rank-card,
  .elune-last-achievement-card {
    flex-direction: column;
  }

  .elune-last-achievement-card {
    padding: 16px;
  }

  .elune-last-achievement-image {
    width: 80px;
    height: 80px;
  }

  .elune-last-achievement-title {
    font-size: 14px;
  }

  .elune-last-achievement-name {
    font-size: 18px;
  }

  .elune-last-achievement-date {
    font-size: 12px;
  }

  .elune-last-achievement-points {
    font-size: 13px;
    padding: 4px 10px;
  }
}

@media (min-width: 900px) {
  .elune-points-container {
    float: left;
    width: 44%;
    max-width: none;
    margin: 0;
    margin-right: 2%;
    box-sizing: border-box;
    height: 100% !important;
    
  }

  .elune-dashboard-grid {
    float: left;
    width: 54%;
    margin: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px;
    height: 363px !important;
  }

  .elune-dashboard-card {
    width: 100%;
    box-sizing: border-box;
    height: 363px !important;

  }
}

/* Limpar floats após os blocos */
.elune-dashboard-grid::after {
  content: "";
  display: table;
  clear: both;
}

