/* Money Input Component Styles */

.money-input {
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

/* Ensure proper styling - override any theme CSS */
.input-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
  position: relative !important;
}

/* Specific override for money input groups */
.money-input-wrapper {
  flex-wrap: nowrap !important;
}

.input-group > * {
  margin: 0 !important;
  float: none !important;
  clear: none !important;
}

/* Money input wrapper specific styles */
.money-input-wrapper > .money-input {
  flex: 1 1 auto !important;
  width: 1% !important;
  min-width: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.money-input-wrapper > .input-group-text {
  flex: 0 0 auto !important;
  border-left: 0 !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  font-weight: 600;
  color: #6c757d;
  background-color: #f8f9fa;
  min-width: 50px;
  justify-content: center;
}

.money-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.money-input.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.money-input.is-valid {
  border-color: #198754;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Animation for value changes */
.money-input.value-changed {
  animation: highlight 0.3s ease-in-out;
}

@keyframes highlight {
  0% {
    background-color: rgba(13, 110, 253, 0.1);
  }
  100% {
    background-color: transparent;
  }
}

/* Dark theme support */
[data-bs-theme='dark'] .money-input-wrapper > .input-group-text {
  background-color: #2b3035 !important;
  color: #adb5bd !important;
  border-color: #495057 !important;
}

[data-bs-theme='dark'] .money-input-wrapper > .money-input {
  background-color: #2b3035 !important;
  border-color: #495057 !important;
  color: #fff !important;
}

[data-bs-theme='dark'] .money-input-wrapper > .money-input:focus {
  background-color: #2b3035 !important;
  border-color: #86b7fe !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}



/* Responsive adjustments */
@media (max-width: 576px) {
  .money-input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}