/* Viettinpay Stat Card — collapse/expand on mobile */

.vtp-stat-card {
  position: relative;
}

.vtp-stat-card__toggle {
  display: none;
}

/* === Badge (icon-list pill) === */
.vtp-stat-card .elementor-widget-icon-list .elementor-widget-container {
  background-color: #e3f7eb;
}

@media (max-width: 768px) {
  /* === Card container === */
  .vtp-stat-card {
    padding: 20px 24px;
    border-radius: 16px;
    gap: 20px;
    transition:
      background-color 0.25s ease,
      color 0.25s ease;
  }

  .vtp-stat-card .vtp-stat-card__head,
  .vtp-stat-card .vtp-stat-card__body {
    padding: 0;
  }

  .vtp-stat-card .vtp-stat-card__head {
    gap: 8px;
  }

  /* === Badge (icon-list pill) === */
  /* Widget outer: shrink + align trái (align-self phải đặt ở đây vì
     parent .vtp-stat-card__head mới là flex container) */
  .vtp-stat-card .elementor-widget-icon-list {
    align-self: flex-start;
    width: auto;
    flex-grow: 0;
  }

  /* Inner container: pill style (inline-flex để bg fit content) */
  .vtp-stat-card .elementor-widget-icon-list .elementor-widget-container {
    display: inline-flex;
    align-items: center;
    background-color: #e3f7eb;
    border-radius: 900px;
    padding: 4px 8px;
    margin: 0;
    gap: 6px;
  }

  .vtp-stat-card .elementor-icon-list-item {
    padding: 0;
    display: inline-flex;
    align-items: center;
  }

  .vtp-stat-card .elementor-icon-list-icon {
    margin: 0;
    display: flex;
    align-items: center;
  }

  .vtp-stat-card .elementor-icon-list-icon svg {
    display: block;
  }

  .vtp-stat-card .elementor-icon-list-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: #0b4627;
  }

  /* === Counter number (9 năm / 40,000+) === */
  .vtp-stat-card .elementor-counter-number-wrapper {
    font-size: 56px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #104f4a;
  }

  /* === Description === */
  .vtp-stat-card .vtp-stat-card__body p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #104f4a;
    margin: 0;
  }

  /* === Open state colors === */
  .vtp-stat-card.is-open {
    background-color: #b3f6a1;
    color: #104f4a;
  }

  .vtp-stat-card .elementor-widget-icon-list .elementor-widget-container {
    background: #e3f7eb;
  }

  .vtp-stat-card.is-open
    .elementor-widget-icon-list
    .elementor-widget-container {
    background: #ffffff;
  }

  /* === Toggle button === */
  .vtp-stat-card__toggle {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 24px;
    height: 24px;
    padding: 0 !important;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: #b3f6a1;
    color: #104f4a;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
      background-color 0.25s ease,
      color 0.25s ease;
  }

  .vtp-stat-card__toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  .vtp-stat-card.is-open .vtp-stat-card__toggle {
    background: #104f4a;
    color: #b3f6a1;
    padding: 0;
  }

  .vtp-stat-card__toggle-icon {
    position: relative;
    width: 12px;
    height: 12px;
    display: inline-block;
  }

  .vtp-stat-card__toggle-icon::before,
  .vtp-stat-card__toggle-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: currentColor;
    border-radius: 1px;
    transform: translate(-50%, -50%);
  }

  .vtp-stat-card__toggle-icon::before {
    width: 10px;
    height: 1.5px;
  }

  .vtp-stat-card__toggle-icon::after {
    width: 1.5px;
    height: 10px;
    transition: transform 0.2s ease;
  }

  .vtp-stat-card.is-open .vtp-stat-card__toggle-icon::after {
    transform: translate(-50%, -50%) scaleY(0);
  }

  /* === Body hide / show === */
  /* Khi card không mở: ẩn hẳn body (không chiếm chiều cao, không ảnh hưởng gap) */
  .vtp-stat-card:not(.is-open) .vtp-stat-card__body {
    display: none;
  }
}
