/* Form Controls Specific Styles */
.form-controls-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 120px 0 80px;
  margin-top: 56px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* File Drop Zone */
.file-drop-zone {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
  border-color: var(--primary-color);
  background: rgba(25, 118, 210, 0.05);
}

.file-drop-zone.dragover {
  transform: scale(1.02);
}

/* Auto-resize Textarea */
.auto-resize {
  resize: none;
  overflow: hidden;
}

/* Custom Range Slider */
.form-range {
  height: 6px;
}

.form-range::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.form-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* FAB Button */
.fab-button {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.fab-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Custom Spinner */
.custom-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Custom Tabs */
.custom-tabs {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.tab-nav {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.tab-button {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.tab-button:hover {
  background: #e9ecef;
}

.tab-button.active {
  background: var(--primary-color);
  color: white;
}

.tab-content {
  padding: 1rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Custom Accordion */
.custom-accordion {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid #dee2e6;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  padding: 1rem;
  background: #f8f9fa;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  font-weight: 500;
}

.accordion-header:hover {
  background: #e9ecef;
}

.accordion-header.active {
  background: var(--primary-color);
  color: white;
}

.accordion-header .material-icons {
  transition: transform 0.3s ease;
}

.accordion-header.active .material-icons {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: white;
}

.accordion-content.active {
  max-height: 200px;
  padding: 1rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-toast {
  min-width: 300px;
  padding: 12px 16px;
  border-radius: 8px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease;
  cursor: pointer;
}

.custom-toast.success {
  background: var(--success-color);
}

.custom-toast.error {
  background: var(--danger-color);
}

.custom-toast.warning {
  background: var(--warning-color);
}

.custom-toast.info {
  background: var(--primary-color);
}

.custom-toast .close-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  font-size: 18px;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Custom Tooltip */
.custom-tooltip {
  position: absolute;
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.custom-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.custom-tooltip.show {
  opacity: 1;
}

/* Custom Modal Styles */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.custom-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content-custom {
  background: white;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.custom-modal.show .modal-content-custom {
  transform: scale(1);
}

.modal-header-custom {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body-custom {
  padding: 1.5rem;
}

.modal-footer-custom {
  padding: 1rem 1.5rem;
  border-top: 1px solid #dee2e6;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
}

/* Custom Popover */
.custom-popover {
  position: absolute;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  z-index: 1000;
  max-width: 250px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.custom-popover.show {
  opacity: 1;
  transform: scale(1);
}

.custom-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -8px;
  border-width: 8px;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.custom-popover::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -9px;
  border-width: 9px;
  border-style: solid;
  border-color: #dee2e6 transparent transparent transparent;
}

/* File List */
.file-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 8px;
}

.file-item .material-icons {
  margin-right: 8px;
  color: var(--primary-color);
}

.file-item .file-name {
  flex: 1;
  font-weight: 500;
}

.file-item .file-size {
  color: #6c757d;
  font-size: 0.875rem;
  margin-right: 8px;
}

.file-item .remove-file {
  background: none;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  padding: 4px;
}

/* Loading Button States */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading .btn-text {
  opacity: 0;
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-controls-header {
    padding: 100px 0 60px;
  }

  .toast-container {
    right: 10px;
    left: 10px;
  }

  .custom-toast {
    min-width: auto;
  }

  .tab-nav {
    flex-direction: column;
  }

  .modal-content-custom {
    margin: 20px;
    width: calc(100% - 40px);
  }
}

/* Animation Classes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* Focus States */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

/* Custom Checkbox and Radio Styles */
.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}
