/**
 * Treasury Bills Calculator CSS - Updated and Fixed
 */

/* Main container styling */
.tbc-calculator-container {
  /*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;*/
  /*max-width: 600px;*/
  /*margin: 0 auto;*/
  /*padding: 20px;*/
  /*background: #ffffff;*/
  /*border: 1px solid #e5e7eb;*/
  /*border-radius: 12px;*/
  /*box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);*/
}

.tbc-calculator-wrapper {
  width: 100%;
}

/* Title styling */
.tbc-title {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  text-align: center;
  margin: 0 0 24px 0;
  padding: 0;
}

/* Form styling */
.tbc-form {
  width: 100%;
}

/* Section styling */
.tbc-section {
  /*background: #f9fafb;*/
  /*border: 1px solid #e5e7eb;*/
  /*border-radius: 8px;*/
  /*padding: 20px;*/
  /*margin-bottom: 20px;*/
}

.tbc-section:last-child {
  margin-bottom: 0;
}

.tbc-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 16px 0;
  padding: 0 0 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

/* Field group styling */
.tbc-field-group {
  margin-bottom: 24px;
  position: relative;
}

.tbc-field-group:last-child {
  margin-bottom: 0;
}

/* Two column layout for specific fields */
.tbc-field-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.tbc-field-row:last-child {
  margin-bottom: 0;
}

.tbc-field-row .tbc-field-group {
  flex: 1;
  margin-bottom: 0;
}

/* Label styling */
.tbc-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  line-height: 1.4;
}

.tbc-required {
  color: #ef4444;
  margin-left: 2px;
}

/* Input styling */
.tbc-input,
.tbc-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #111827;
  background-color: #ffffff;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-sizing: border-box;
}

.tbc-input:focus,
.tbc-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tbc-input::placeholder {
  color: #9ca3af;
}

/* Select specific styling */
.tbc-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  appearance: none;
}

/* Disabled/readonly input styling */
.tbc-input[readonly],
.tbc-input[disabled] {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

/* Button group styling */
.tbc-button-group {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

/* Button styling */
.tbc-calculate-btn,
.tbc-refresh-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

.tbc-calculate-btn {
  background-color: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

.tbc-calculate-btn:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

.tbc-calculate-btn:active {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

.tbc-refresh-btn {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

.tbc-refresh-btn:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.tbc-refresh-btn:active {
  background-color: #f3f4f6;
}

/* Loading state */
.tbc-calculate-btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.tbc-calculate-btn.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error styling */
.tbc-input.error,
.tbc-select.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.tbc-error-message {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  display: none;
  line-height: 1.4;
}

.tbc-error-message.show {
  display: block;
}

/* Result animation */
.tbc-input.updated {
  background-color: #f0fdf4;
  border-color: #22c55e;
  transition: all 0.3s ease;
}

/* Notification styling */
.tbc-notification {
  display: none;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
}

.tbc-notification.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.tbc-notification.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.tbc-notification.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.tbc-notification.warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* Responsive design */
/*@media (max-width: 768px) {*/
/*  .tbc-calculator-container {*/
    /*margin: 10px;*/
    /*padding: 16px;*/
/*  }*/

/*  .tbc-section {*/
/*    padding: 16px;*/
/*  }*/

/*  .tbc-title {*/
/*    font-size: 18px;*/
/*    margin-bottom: 20px;*/
/*  }*/

/*  .tbc-button-group {*/
/*    flex-direction: column;*/
/*    gap: 8px;*/
/*  }*/

/*  .tbc-calculate-btn,*/
/*  .tbc-refresh-btn {*/
/*    width: 100%;*/
/*  }*/

/*  .tbc-field-row {*/
/*    flex-direction: column;*/
/*    gap: 0;*/
/*  }*/
/*}*/

/*@media (max-width: 480px) {*/
/*  .tbc-calculator-container {*/
/*    margin: 5px;*/
/*    padding: 12px;*/
/*  }*/

/*  .tbc-section {*/
/*    padding: 12px;*/
/*  }*/

/*  .tbc-title {*/
/*    font-size: 16px;*/
/*  }*/

/*  .tbc-section-title {*/
/*    font-size: 14px;*/
/*  }*/

/*  .tbc-label {*/
/*    font-size: 13px;*/
/*  }*/

/*  .tbc-input,*/
/*  .tbc-select {*/
/*    font-size: 13px;*/
/*    padding: 8px 10px;*/
/*  }*/
/*}*/

