.ps-installments-block {
  margin: 10px 0;
  border: 1px solid #f2f2f2;
  border-radius: 0;
  background-color: #f8f9fa;
}

.ps-installments-block.custom-position {
  padding: 0 8px;
}

.ps-installments-header {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 8px 12px;
  justify-content: space-between;
  gap: 8px;
}

.ps-installments-block .material-icons {
  vertical-align: middle;
  margin-right: 8px;
  color: #000;
  font-size: 2em;
}

.ps-installments-block .material-icons.keyboard_arrow_down,
.ps-installments-block .material-icons.keyboard_arrow_up {
  font-size: 20px;
  margin-right: 0;
}

.installments-toggle-btn {
  cursor: pointer;
  margin-left: auto;
  font-size: 16px;
  color: #fff;
  background-color: #000;
  text-align: center;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
  border: none;
}

.installments-toggle-btn:hover {
  background-color: #1976d2;
}

.installments-toggle-btn:active {
  transform: translateY(0);
}

.installments-toggle-btn .material-icons {
  color: #fff;
  font-size: 20px;
  margin: 0;
}

.ps-installments-block a {
  color: #000;
  text-decoration: underline;
  font-weight: 500;
}

.ps-installments-block a:hover {
  text-decoration: none;
}

.installments-table {
  margin-top: 15px;
  overflow-x: auto;
}

.installments-table table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  min-width: 400px;
}

.installments-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid #f8f9fa;
}

.installments-table td {
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid #f8f9fa;
}

.installments-table td:nth-child(1) {
  font-weight: 500;
}

.installments-table tr:last-child td {
  border-bottom: none;
}

.installments-table .total-interest {
  color: #e74c3c !important;
  font-weight: 600;
  white-space: nowrap;
}

.total-amount {
  color: #333;
  font-weight: 600;
  white-space: nowrap;
}

.monthly-amount {
  color: #27ae60;
  font-weight: 600;
}

.extra-charge,
.monthly-surcharge {
  color: #e74c3c;
  font-size: 0.9em;
  font-weight: 600;
  white-space: nowrap;
}

.no-charge {
  color: #999;
  font-weight: normal;
}

.zero-interest-badge,
.interest-rate-badge {
  display: inline-block;
  color: #fff;
  font-size: 0.7em;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
}

.zero-interest-badge {
  background-color: #27ae60;
}

.interest-rate-badge {
  background-color: #e74c3c;
}

.installment-row.has-surcharge {
  background-color: #fff9f9;
}

.installments-table tr:hover {
  background-color: #fcfcfc;
}

@media (max-width: 768px) {
  .installments-table {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
  }

  .installments-table table {
    min-width: 100%;
  }

  .installments-table th,
  .installments-table td {
    padding: 8px 10px;
  }

  .ps-installments-block {
    padding: 12px;
  }

  .ps-installments-header {
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .ps-installments-message {
    flex: 1;
    min-width: 0;
  }

  .psm_installments_icon {
    flex-shrink: 0;
  }

  .installments-toggle-btn {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .ps-installments-block .material-icons {
    font-size: 1.5em;
  }

  .installments-table th,
  .installments-table td {
    padding: 6px 8px;
    font-size: 0.9em;
  }
}
