/* Popup Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; /* Ensure you control the visibility through JavaScript */
  pointer-events: none;
}

/* Popup Content */
.popup {
  background: white;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  max-height: 95vh;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  font-size: 24px;
  color: #333;
}

/* Transaction Styles */
.transaction,
.moreBreakup {
  background-color: #f9f9f9;
  margin-bottom: 10px;
  border-radius: 4px;
  padding: 10px;
  border: 1px solid #eaeaea;
  display: flex;
  justify-content: space-between;
}

.transaction span,
.moreBreakup span {
  /* display: block; */
  margin-bottom: 5px;
}

/* Text and Headings */
h2 {
  color: #333;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

p {
  line-height: 1.6;
  color: #666;
}

h3 {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  color: #333;
}

/* Borrowed Styles from Form UX */
body {
  font-family: "Arial", sans-serif;
  background-color: #f4f4f4;
}

p strong {
  color: #333;
}

#transactionsList {
  margin-top: 15px;
}

/** --------- ***/

body {
  font-family: "Arial", sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 20px;
}

form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Grouping */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Select Element */
select.form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 25px;
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 16px;
}

/* Buttons */
button {
  padding: 10px 20px;
  border: none;
  background-color: #007bff;
  color: white;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

button.reset {
  background-color: red;
  display: block;
  margin-left: auto;
}

.margin-top {
  margin-top: 20px;
}

.margin-top input {
  flex: none;
  width: unset;
}

button:hover {
  background-color: #0056b3;
}

.extra-payments h3 {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Aligning form elements inline */
@media (min-width: 576px) {
  .form-group {
    display: flex;
    align-items: center;
  }

  .form-group label {
    width: 20%;
    min-width: 150px;
    margin-bottom: 0;
  }

  .form-control,
  select.form-control {
    flex: 1;
  }
}

/* Additional and Received payments section styling */
.extra-payments,
.received-payments {
  margin-top: 30px;
}

/* Extra Payment Element Style */
.extra-payment,
.received-payment {
  background-color: #f9f9f9;
  margin-bottom: 10px;
  border-radius: 4px;
  padding: 10px;
  border: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #333;
}

.extra-payment .date,
.received-payment .date .extra-payment .amount,
.received-payment .amount {
  margin-right: 15px;
}

.extra-payment .amount::before,
.received-payment .amount::before {
  content: "Rs. ";
}

.extra-payment span[onclick],
.received-payment span[onclick] {
  cursor: pointer;
  padding: 5px 10px;
  background-color: #ff6b6b;
  color: white;
  border-radius: 4px;
  font-size: 0.8em;
  user-select: none;
}

.extra-payment span[onclick]:hover,
.received-payment span[onclick]:hover {
  background-color: #ff3b3b;
}
