/* Loan Terms Card Styling */
.loan-terms-card {
  position: relative;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

/* Initial empty state animation */
.loan-terms-card:not(.has-values) .loan-terms-value {
  position: relative;
  color: #e9ecef;
  min-height: 24px;
}

.loan-terms-card:not(.has-values) .loan-terms-value::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.5) 50%, 
    rgba(255,255,255,0) 100%);
  animation: shimmer 2s infinite;
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Calculating state animation */
.loan-terms-card.calculating {
  position: relative;
  pointer-events: none;
}

.loan-terms-card.calculating::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
  border-radius: 0.5rem;
  z-index: 1;
}

.loan-terms-card.calculating::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #28a745;
  border-radius: 50%;
  z-index: 2;
  animation: spin 1s linear infinite;
}

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

/* Form validation styles */
.form-group.error .form-select,
.form-group.error .flatpickr-input {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-group.error .floating-label {
  color: #dc3545 !important;
}

@keyframes highlight-pulse {
  0% { border-color: #dc3545; }
  50% { border-color: #ff6b6b; }
  100% { border-color: #dc3545; }
}

.form-group.error .form-select,
.form-group.error .flatpickr-input {
  animation: highlight-pulse 1s ease-in-out;
}

/* Claim Offer button styles */
.claim-offer-btn {
  position: relative;
  transition: all 0.3s ease;
}

.claim-offer-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.validation-error {
  color: #dc3545;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.75rem;
  text-align: center;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  background-color: rgba(220, 53, 69, 0.1);
  border-radius: 0.5rem;
  border: 1px solid rgba(220, 53, 69, 0.2);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.validation-error::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.875rem;
}

.validation-error.show {
  opacity: 1;
  transform: translateY(0);
}

.claim-offer-btn.error {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Responsive styles */
@media (max-width: 900px) {
  .col-10.col-md-6.text-center {
    width: 83.333333% !important;
    max-width: 83.333333% !important;
  }
}

/* Form group states */
.form-group.disabled {
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Smooth transitions for values */
.loan-terms-value {
  transition: all 0.3s ease;
}

.loan-terms-value.error {
  color: #dc3545;
  animation: shake 0.5s ease-in-out;
} 