.wc-credits-account {
  width: 100%;
}

.wc-credits-account h2,
.wc-credit-modal-content h3,
.wc-credit-modal-content h4 {
  line-height: 1.3;
}

.wc-credits-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.wc-credits-summary .item {
  background: #fff;
  padding: 12px;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  min-width: 160px;
  flex: 1 1 180px;
  box-sizing: border-box;
}
.wc-credits-summary .label {
  display: block;
  color: #666;
  font-size: 12px;
}
.wc-credits-summary .value {
  display: block;
  font-weight: 700;
  font-size: 16px;
  margin-top: 6px;
}
.wc-credits-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  table-layout: auto;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.wc-credits-table th,
.wc-credits-table td {
  padding: 10px;
  border: 1px solid #eee;
  text-align: left;
  vertical-align: top;
}

.wc-credits-table .button,
.wc-credit-modal-content .button {
  white-space: nowrap;
}

.wc-credit-modal-content p,
.wc-credit-modal-content li {
  word-break: break-word;
}

.wc-credit-payment-history,
.wc-credit-repayment-history {
  margin: 0 0 16px 18px;
  padding: 0;
}

.wc-credit-submitted {
  padding: 14px 16px;
  border: 1px solid #d8e7d8;
  border-radius: 8px;
  background: #f6fbf6;
}

.wc-credit-modal-content input[type="text"],
.wc-credit-modal-content input[type="number"],
.wc-credit-modal-content input[type="file"],
.wc-credit-modal-content textarea,
.wc-credit-modal-content select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.wc-credit-modal-content textarea {
  min-height: 96px;
}

.wc-credit-modal-content label {
  display: block;
  font-weight: 600;
}

.wc-credit-modal-content form p {
  margin: 0 0 14px;
}

.wc-credit-request-status,
.wc-credit-order-status {
  font-weight: 700;
}

html.wc-credit-modal-open,
body.wc-credit-modal-open {
  overflow: hidden !important;
  height: 100%;
  touch-action: none;
}

#wc-credit-modal {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.wc-credit-modal-inner {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow: auto;
  overscroll-behavior: contain;
  position: relative;
  box-sizing: border-box;
}
.wc-credit-modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: 1px solid #d7d7d7 !important;
  background: #ffffff !important;
  font-size: 28px;
  font-weight: 700;
  color: #111111 !important;
  opacity: 1 !important;
  cursor: pointer;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  visibility: visible !important;
}

.wc-credit-modal-close:hover {
  color: #000 !important;
}

/* Stronger styling to ensure visibility across themes */
.wc-credit-modal-close {
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10001;
}

#wc-credit-modal .wc-credit-modal-inner {
  z-index: 10000;
}

@media (max-width: 767px) {
  .wc-credits-account {
    padding-right: 0;
  }

  .wc-credits-summary {
    gap: 10px;
  }

  .wc-credits-summary .item {
    flex: 1 1 100%;
    min-width: 0;
  }

  .wc-credits-table {
    font-size: 13px;
  }

  .wc-credits-table th,
  .wc-credits-table td {
    padding: 8px;
  }

  .wc-credits-table .button {
    min-width: 110px;
  }

  #wc-credit-modal {
    align-items: flex-end;
  }

  .wc-credit-modal-inner {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    margin: 0;
    border-radius: 16px 16px 0 0;
    padding: 18px 14px 24px;
  }

  .wc-credit-modal-close {
    right: 10px;
    top: 10px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .wc-credit-modal-content {
    padding-top: 22px;
  }

  .wc-credit-modal-content h3 {
    padding-right: 44px;
    margin-top: 0;
    font-size: 28px;
  }

  .wc-credit-modal-content h4 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .wc-credit-modal-content p,
  .wc-credit-modal-content li,
  .wc-credit-modal-content label {
    font-size: 15px;
  }

  .wc-credit-modal-content .button {
    width: 100%;
    text-align: center;
  }
}
