/**
 * Cash Products Shortcode Styles
 * Shortcode: [cash_products]
 */

/* Main Container */
.cash-products {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background: #fff;
}

.cash-products__title {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  text-align: center;
  margin-bottom: 32px;
}

/* Filter Form Styling */
.cash-filter {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 32px;
  justify-content: center;
}

.cash-filter__select,
.cash-filter__input {
  min-width: 180px;
  height: 40px;
  border: 2px solid #0000001A;
  border-radius: 10px;
  background: #FAFEFF;
  font-size: 14px;
  color: #020202A3;
  transition: border-color 0.2s;
  padding: 0 12px;
}

.cash-filter__input {
  min-width: 200px;
}

.cash-filter__select:focus,
.cash-filter__input:focus {
  outline: none;
  border-color: #38A46F;
}

.search-btn {
  flex: 1;
}

.select-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 16px;
}

.cash-filter .button.primary {
  background: linear-gradient(135deg, #38A46F 0%, #386B7C 100%);
  color: #fff;
  height: 40px;
  width: 145px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(255,87,34,0.25);
}

.cash-filter .button.primary:hover {
  background: linear-gradient(135deg, #e64a19 0%, #ff5722 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,87,34,0.35);
}

/* Cash List Styling */
.cash-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cash Item Enhanced Styling */
.cash-list .cash-item {
  display: flex;
  align-items: center;
  background: #fff !important;
  border: 1px solid #e8f5e8;
  border-radius: 12px;
  padding: 11px 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cash-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #389F70 0%, #386E7C 100%);
}

.cash-item:hover {
  box-shadow: 0 6px 24px rgba(56,159,112,0.15);
  transform: translateY(-2px);
  border-color: #389F70;
}

.cash-item__left {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 280px;
  min-width: 280px;
  flex-shrink: 0;
}

.cash-item__logo {
  width: 140px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e8f5e8;
  padding: 6px;
  background: #fff;
}

.cash-item__info {
  flex: 1;
}

.cash-item__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 6px 0;
  max-width: 200px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cash-item__rating {
  font-size: 0.9rem;
  font-weight: 600;
  color: #389F70;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cash-item__details {
  display: flex;
  gap: 32px;
  align-items: center;
  flex: 1;
  font-size: 0.9rem;
  color: #666;
  margin-left: 30px;
}

.cash-item__details > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  width: 120px;
  min-width: 120px;
  flex-shrink: 0;
}

.cash-item__details strong {
  color: #389F70;
  font-weight: 700;
  font-size: 1rem;
}

.cash-item__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-direction: column;
  width: 145px;
}

.cash-item__actions .button.success {
  background: linear-gradient(135deg, #389F70 0%, #386E7C 100%);
  color: #fff;
  width: 145px;
  height: 40px;
  line-height: 40px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 2px 6px rgba(56,159,112,0.2);
  text-align: center;
  display: block;
  padding: 0;
}

.cash-item__actions .button.success:hover {
  background: linear-gradient(135deg, #2d8560 0%, #2d5a66 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56,159,112,0.3);
}

.cash-item__actions .btn-view-detail {
  background: #F6F6F6;
  color: #38707B;
  width: 145px;
  height: 40px;
  line-height: 40px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.3s;
  text-align: center;
  display: block;
}

.cash-item__actions .btn-view-detail:hover {
  background: #e8e8e8;
  color: #38707B;
}

/* Load More Button */
.cash-products .button.secondary {
  background: linear-gradient(135deg, #389F70 0%, #386E7C 100%);
  color: #fff;
  height: 50px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(56,159,112,0.25);
}

.cash-products .button.secondary:hover {
  background: linear-gradient(135deg, #2d8560 0%, #2d5a66 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56,159,112,0.35);
}

#loadMoreCash {
  width: 380px;
  margin-top: 10px;
}

/* Responsive Design - Tablet (992px and below) */
@media only screen and (max-width: 992px) {
  .cash-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px 16px;
  }

  .cash-filter__select {
    min-width: auto;
    width: 100%;
  }

  .select-item {
    flex-direction: column;
    gap: 12px;
  }

  .cash-item {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .cash-item__left {
    width: 100%;
    min-width: unset;
  }

  .cash-item__logo {
    width: 140px;
    height: 48px;
  }

  .cash-item__info {
    flex: 1;
  }

  .cash-item__title {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .cash-item__rating {
    font-size: 0.85rem;
  }

  .cash-item__details {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .cash-item__details > div {
    width: auto;
    min-width: unset;
    flex: 1;
  }

  .cash-item__title {
    max-width: none;
  }

  .cash-item__details strong {
    font-size: 0.95rem;
  }

  .cash-item__actions {
    width: 100%;
    flex-direction: row;
  }

  .cash-item__actions a {
    flex: 1;
  }

  .cash-item__actions .button {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    height: auto;
    line-height: 1.4;
  }

  .cash-item__actions .button.success,
  .cash-item__actions .button.outline {
    margin-bottom: 0;
  }
}

/* Mobile - Small Tablet (768px and below) */
@media only screen and (max-width: 768px) {
  .cash-products {
    padding: 20px 12px;
  }

  .cash-products__title {
    font-size: 1.5rem;
    margin-bottom: 24px;
  }

  .cash-filter {
    padding: 16px 12px;
    gap: 12px;
  }

  .cash-item__left {
    gap: 12px;
  }

  .cash-item__logo {
    width: 140px;
    height: 48px;
  }

  .cash-item__title {
    font-size: 1rem;
    -webkit-line-clamp: 2;
  }

  .cash-item__rating {
    font-size: 0.9rem;
  }

  .cash-item__details {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 8px;
  }

  .cash-item__details strong {
    font-size: 1rem;
    margin-top: 2px;
  }

  .cash-item__actions {
    flex-direction: row;
  }

  .cash-item__actions a {
    width: 100%;
  }

  .cash-item__actions .button {
    font-size: 0.9rem;
    border-radius: 6px;
    height: auto;
    line-height: 1.4;
  }

  .cash-item__actions .button.success,
  .cash-item__actions .button.outline {
    margin-bottom: 0;
  }
}

/* Mobile - Small Screen (550px and below) */
@media only screen and (max-width: 550px) {
  .cash-products {
    padding: 16px 10px;
  }

  .cash-products__title {
    font-size: 1.4rem;
  }

  .cash-item__rating {
    font-size: 0.85rem;
  }

  .cash-item__details strong {
    font-size: 0.95rem;
    white-space: nowrap;
    display: block;
    margin-top: 3px;
  }

  .cash-item__actions .button {
    width: 100%;
    font-size: 0.9rem;
    height: auto;
    line-height: 1.4;
  }

  .cash-item__actions .button.success,
  .cash-item__actions .button.outline {
    margin-bottom: 0;
  }
}

/* Mobile - Extra Small Screen (400px and below) */
@media only screen and (max-width: 400px) {
    .cash-item {
      display: grid !important;
      grid-template-columns: 7fr 3fr;
      grid-template-areas:
      "left left"
      "details actions";
      gap: 8px;
      padding: 12px !important;
    }

  .cash-item__left {
    grid-area: left;
  }

  .cash-item__logo {
    width: 80px;
    height: 40px;
    flex-shrink: 0;
  }

  .cash-item__title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
  }

  .cash-item__rating {
    font-size: 0.8rem;
  }

  .cash-item__details {
    gap: 10px 6px;
    font-size: 0.75rem;
    grid-area: details;
  }

  .cash-item__actions {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }

  .cash-item__details > div {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .cash-item__details strong {
    font-size: 0.95rem;
  }

  .cash-item__actions a {
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
  }

  .cash-item__actions .button {
    font-size: 0.85rem;
    height: auto;
    line-height: 1.4;
  }

  .cash-item__actions .button.success,
  .cash-item__actions .button.outline {
    margin-bottom: 12px;
    margin-right: 0;
  }
}
