/* Transaction Edit Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 600px;
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from {opacity: 0; transform: translateY(-50px);}
  to {opacity: 1; transform: translateY(0);}
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #333;
}

.close-modal {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
}

/* Tab Styling */
.tab-container {
  margin-bottom: 20px;
}

.tab-nav {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.tab-link {
  padding: 10px 15px;
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  margin-right: 5px;
  background-color: #f8f9fa;
}

.tab-link.active {
  background-color: #fff;
  border-color: #ddd;
  border-bottom-color: #fff;
  color: #007bff;
  margin-bottom: -1px;
}

.tab-content {
  background-color: #fff;
  padding: 15px;
  border-radius: 0 0 4px 4px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

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

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

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

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

.toggle-group {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.toggle-button {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  background-color: #f5f5f5;
  transition: all 0.2s ease;
  cursor: pointer;
}

.toggle-button:first-child {
  border-radius: 4px 0 0 4px;
}

.toggle-button:last-child {
  border-radius: 0 4px 4px 0;
}

.toggle-button.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.toggle-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  background: #f8f9fa;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: #007bff;
  color: white;
}

/* Transaction type indicators */
.transaction-type-indicator {
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transaction-type-indicator.recurring {
  background-color: #e6f7ff;
  color: #0066cc;
  border: 1px solid #b3d9ff;
}

.transaction-type-indicator.recurring::before {
  content: "\f021";
  font-family: "Font Awesome 5 Free";
  margin-right: 8px;
}

.transaction-type-indicator.oneoff {
  background-color: #fff0e6;
  color: #cc6600;
  border: 1px solid #ffcc99;
}

.transaction-type-indicator.oneoff::before {
  content: "\f133";
  font-family: "Font Awesome 5 Free";
  margin-right: 8px;
}

/* Category Styling */
.ml-10 {
  margin-left: 10px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
  .modal-content {
    margin: 10% auto;
    width: 95%;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions button {
    width: 100%;
    margin-bottom: 10px;
  }
}
