/* Calculator Form - Horizontal Card Layout */
.calculator-field-wrapper {
  display: flex;
  gap: 16px;
}

.calculator-field {
  flex: 1;
  background: #ffffff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.08);
  position: relative;
}

.calculator-field-amount {
  flex: 1.6;
  min-width: 0;
}

.calculator-field-tenor {
  flex: 1;
  min-width: 0;
  height: 90px;
  position: relative;
  z-index: 10;
}

.calculator-field label {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: #1f2e45;
  margin-bottom: 4px;
}

.calculator-field-value {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  flex-direction: row;
}

.calculator-field-prefix {
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  color: #1f2e45;
  flex-shrink: 0;
  white-space: nowrap;
}

.calculator-field input {
  border: none;
  background: transparent;
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  color: #1f2e45;
  margin: 0;
  width: 100%;
  outline: none;
  flex: 1;
  min-width: 0;
  display: block;
}

.calculator-field input::placeholder {
  color: #abadb9;
  font-weight: 600;
  opacity: 1;
  font-size: 20px;
}

.title-two {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 600;
    color: #1F2E45;
  }

.calculator-error {
  display: none;
  color: #ef4444;
  font-size: 12px;
  margin-top: 8px;
  font-family: "Poppins", sans-serif;
}

.custom-select-container {
  position: relative;
  font-family: "Poppins";
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-select-selected {
  border: none;
  background: transparent;
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  color: #1f2e45 !important;
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-decoration: none;
}

.custom-select-selected .dashicons {
  color: #1f2e45;
  font-size: 12px;
  width: 12px;
  height: 7.41px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.custom-select-selected.active .dashicons {
  transform: rotate(180deg);
}

.custom-select-selected.active:after {
  border-top: none;
  border-bottom: 5px solid #666;
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  right: -16px;
  background-color: white;
  border-radius: 12px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);
}

.custom-select-option {
  padding: 12px 16px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  color: #1f2e45;
}

.custom-select-option:hover {
  background-color: #f9f9f9;
}

.custom-select-option:first-child {
  border-radius: 12px 12px 0 0;
}

.custom-select-option:last-child {
  border-radius: 0 0 12px 12px;
}

.custom-select-options.show {
  display: block;
}

/* Calendar related styles */
.cal-save-button.disabled {
  background-color: #abadb9 !important;
  cursor: not-allowed;
}

.cal-save-button.disabled p {
  opacity: 0.7;
}

.beyond-365 {
  color: #abadb9 !important;
  cursor: not-allowed !important;
}

.beyond-365 small {
  color: #abadb9 !important;
}

.calculator-container {
  margin-top: 16px !important;
  border-radius: 24px;
  border: 1px solid #f0ebfb;
  padding: 40px;
}

.calculator-tab-1 {
  margin: 0 0 24px 0;
  display: flex;
  gap: 8px;
  background: #F7F9FC;
  border-radius: 60px;
  padding: 4px;
  border: none;
}

.calculator-tab-item-1 {
  padding: 12px 16px;
  flex: 1;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-style: normal;
  line-height: 21px;
  cursor: pointer;
  color: #6b717b;
  background: transparent;
  border-radius: 40px;
  transition: all 0.3s ease;
  border: none;
}

.calculator-tab-item-1.active {
  background: #ffffff;
  color: #1f2e45;
  box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.08);
}

/* Product Selection Section */
.calculator-product-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.calculator-product-section.hidden {
  display: none !important;
}

label.calculator-product-label {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 21px;
  color: #1F2E45;

  margin: 0;

}

.calculator-product-options {
  display: flex;
  gap: 8px;
}

.calculator-product-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  background-color: #F7F7FC;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.calculator-product-option:hover {
  background-color: #EEEBF7;
}

.calculator-product-option input[type="radio"] {
  display: none;
}

.calculator-product-option input[type="radio"]:checked~.calculator-product-radio {
  background-color: #FFFFFF;
  border: solid 1px #D0D0D0;
}

.calculator-product-option input[type="radio"]:checked~.calculator-product-radio::after {
  opacity: 1;
  background-color: #6936D3;
  width: 10px;
  height: 10px;
}

.calculator-product-radio {
  width: 16px;
  height: 16px;
  border: 2px solid #D0D0D0;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
  background-color: #FFFFFF;
}

.calculator-product-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.calculator-product-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 80px;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  line-height: 18px;
  color: #1F2E45;
}

.calculator-product-text .product-name {
  margin: 0;
}

.calculator-product-text .product-type {
  margin: 0;
}

/* Info Message */
.calculator-info-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #ebf7ff;
  border: 1px solid #BCE4FF;
  border-radius: 8px;
  margin-top: 24px;
}

.calculator-info-message svg {
  flex-shrink: 0;
  height: 20px;
  width: 20px;
}

.calculator-info-message span {
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: #1f2e45;
  flex: 1;
}

/* Hide old tab-2 styles */
.calculator-tab-2 {
  display: none;
}

.modal-content.calculator-modal {
  background-color: white !important;
}

/* Calculator Detail & Summary Styles */
.calculator-detail {
  margin-top: 32px;
  padding: 24px;
  background: #f7f9fc;
  border-radius: 16px;
}

.calculator-detail ul {
  list-style: none !important;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calculator-detail ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: #1f2e45;
}

.calculator-detail ul li span {
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: #1f2e45;
  text-align: right;
}

.calculator-form {
  margin-left: -40px;
  margin-right: -40px;
  padding: 16px 40px;
}

.calculator-summary {
  margin-top: 12px;
  background: transparent;
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calculator-summary>div:first-child {
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  color: #1f2e45;
}

.calculator-summary>div:last-child {
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  color: #1f2e45;
  text-align: right;
}

@media (width < 900px) {
  /* Removed fixed width constraint */
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .title-two {
    margin-left: auto;
    margin-right: auto;
    max-width: 312px;
  }
  .custom-select-option {
  font-size: 12px;
}
  .calculator-info-message svg {
  flex-shrink: 0;
  height: 13px;
  width: 13px;
}
  .calculator-container {
    padding: 24px 16px;
    max-width: 312px;
    margin-left: auto;
    margin-right: auto;
  }

  .calculator-tab-1 {
    margin: 0 0 16px 0;
    padding: 4px;
    gap: 0;
    width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .calculator-tab-item-1 {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
  }

  .calculator-tab-item-1.active {
-  }

  .calculator-field-wrapper {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 280px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .calculator-field {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
  }

  .calculator-field-amount {
    flex: 1.6;
    min-width: 0;
    max-width: none;
    height: 75px;
  }

  .calculator-field-tenor {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 75px;
  }

  .calculator-field label {
    font-size: 12px;
    line-height: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
  }

  .calculator-field-value {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    flex-direction: row;
    width: 100%;
  }

  .calculator-field input {
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
    padding: 0;
    width: 100%;
    min-width: 0;
  }

  .calculator-field input::placeholder {
    font-size: 14px;
    color: #abadb9;
  }

  .calculator-field-prefix {
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
    margin-right: 4px;
  }

  .custom-select-container {
    gap: 4px;
  }

  .custom-select-selected {
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
  }

  .custom-select-selected .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
  }

  .calculator-product-section {
    margin-bottom: 16px;
    width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .calculator-product-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    margin-bottom: 8px;
  }

  .calculator-product-options {
    gap: 8px;
    height: 78px;
  }

  .calculator-product-option {
    padding: 12px 6px;
    border-radius: 16px;
    height: 78px;
  }

  .calculator-product-text {
    width: 80px;
    font-size: 10px;
    line-height: 15px;
  }

  .calculator-product-text .product-name,
  .calculator-product-text .product-type {
    font-size: 10px;
    font-weight: 500;
    line-height: 15px;
  }

  .calculator-detail {
    margin-top: 16px;
    padding: 16px;
    background: #f7f9fc;
    border-radius: 16px;
    width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .calculator-detail ul {
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
  }

  .calculator-detail ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    font-family: "Poppins", sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 15px;
    color: #1f2e45;
  }

  .calculator-detail ul li span {
    font-family: "Poppins", sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 15px;
    color: #1f2e45;
    text-align: right;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calculator-summary {
    margin-top: 8px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .calculator-summary>div:first-child {
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    color: #1f2e45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calculator-summary>div:last-child {
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    color: #1f2e45;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calculator-form {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px 16px 16px;
  }

  .calculator-info-message {
    padding: 12px;
    gap: 10px;
    margin-top: 16px;
    width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .calculator-info-message span {
    font-size: 12px;
    line-height: 1.4;
  }

  .calculator-info-message svg {
    width: 13px;
    height: 13px;
  }
  label.calculator-product-label {
    font-size: 12px !important;
  }
  
}

@media (width < 480px) {
  .calculator-container {
    padding: 20px 16px;
  }

  .calculator-product-options {
    gap: 8px;
  }

  .calculator-product-option {
    padding: 14px 12px;
  }

  .calculator-summary>div:last-child {
    font-size: 12px;
  }

  .calculator-form {
    margin-left: -24px;
    margin-right: -24px;
    padding: 24px;
  }

  .title-two {
    margin: 0 15px;
    padding-left: 16px;
  }

  .label.calculator-product-label {
    font-size: 12px !important;
  }
}