/**
 * Activity Summary Cards Component
 * Styles for the points earned, points spent, and mutations cards
 * These cards show important activity metrics for the user's 4Square account
 */

/* Points earned/spent value styling */
.activity-summary-card .field-content {
  font-size: 36px;
  font-weight: 700;
  margin: 15px 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

/* Add direction indicator icons */
.activity-summary-card:nth-of-type(3) .field-content::before {
  content: '↑';
  font-size: 24px;
  margin-right: 10px;
  color: var(--success);
}

.activity-summary-card:nth-of-type(4) .field-content::before {
  content: '↓';
  font-size: 24px;
  margin-right: 10px;
  color: var(--danger);
}

/* Positive values (points earned) */
.activity-summary-card:nth-of-type(3) .field-content {
  color: var(--success);
}

/* Negative values (points spent) */
.activity-summary-card:nth-of-type(4) .field-content {
  color: var(--danger);
}

/* Rewards redeemed count */
.activity-summary-card:nth-of-type(5) .field-content {
  color: var(--purple);
}

.activity-summary-card:nth-of-type(5) .field-content::before {
  content: '🎁';
  font-size: 24px;
  margin-right: 10px;
  color: var(--purple);
}

/* Description text styling */
.activity-summary-card .field-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 15px;
}

/* Recent Mutations Card Styling */
.recent-mutations {
  margin-top: 40px;
}

.recent-mutations .block-title {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 25px;
}

.recent-mutations .block-title::before {
  content: '⟳';
  margin-right: 12px;
  color: var(--primary);
}

/* Mutations table styling */
.recent-mutations table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.recent-mutations table thead th {
  text-align: left;
  padding: 15px 20px;
  background-color: var(--silver);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.recent-mutations table tbody tr {
  transition: background-color 0.2s ease;
}

.recent-mutations table tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.05);
}

.recent-mutations table tbody td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--silver);
  color: var(--text-primary);
  font-size: 14px;
}

/* Style for mutation type icons */
.views-field-field-ms-mutation-type-icon {
  width: 40px;
}

.mutation-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: white;
}

.mutation-type-icon.increase {
  background-color: var(--success);
}

.mutation-type-icon.decrease {
  background-color: var(--danger);
}

/* Points column styling */
.views-field-field-ms-points-1 {
  font-weight: 600;
}

.views-field-field-ms-points-1.increase {
  color: var(--success);
}

.views-field-field-ms-points-1.decrease {
  color: var(--danger);
}

/* Action button styling */
.mutation-action-btn {
  display: inline-block;
  padding: 6px 12px;
  background-color: var(--danger);
  color: white;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mutation-action-btn:hover {
  background-color: var(--danger-dark);
  transform: translateY(-2px);
}

.mutation-action-btn.view {
  background-color: var(--primary);
}

.mutation-action-btn.view:hover {
  background-color: var(--primary-dark);
}

/* Pagination styling */
.mutations-pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.pagination-item {
  margin: 0 5px;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--silver);
}

.pagination-item:hover,
.pagination-item.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Responsive table adjustments */
@media (max-width: 767px) {
  .recent-mutations table {
    display: block;
    width: 100%;
  }
  
  .recent-mutations table thead {
    display: none;
  }
  
  .recent-mutations table tbody, 
  .recent-mutations table tr, 
  .recent-mutations table td {
    display: block;
    width: 100%;
  }
  
  .recent-mutations table tr {
    margin-bottom: 20px;
    border: 1px solid var(--silver);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
  }
  
  .recent-mutations table td {
    text-align: right;
    padding: 12px 15px;
    position: relative;
    border: none;
    border-bottom: 1px solid var(--silver);
  }
  
  .recent-mutations table td:last-child {
    border-bottom: none;
  }
  
  .recent-mutations table td::before {
    content: attr(data-title);
    position: absolute;
    left: 15px;
    font-weight: 600;
  }
  
  /* Adjust icon position on mobile */
  .views-field-field-ms-mutation-type-icon {
    text-align: center;
  }
}
