/* Reusable Modal Component Styles */

.tb-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}

.tb-modal-overlay.show {
  display: flex;
}

.tb-modal {
  background: white;
  border-radius: var(--border-radius-2, 8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.2s ease-out;

  margin: auto;
  margin-top: 5%;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modal Size Variants */
.tb-modal-small {
  width: 400px;
}

.tb-modal-medium {
  width: 600px;
}

.tb-modal-large {
  width: 800px;
}

.tb-modal-xlarge {
  width: 1000px;
}

/* Modal Header */
.tb-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--padding-containers, 20px);
  border-bottom: 1px solid var(--header-background-color, #f0f0f0);
}

.tb-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color-table, #333);
}

.tb-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-1, 4px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

/* Modal Body */
.tb-modal-body {
  padding: var(--padding-containers, 20px);
  overflow-y: auto;
  flex: 1;
}

/* Modal Content Layout Utilities */

/* Form row layout for multiple inputs in modals */
.tb-modal-form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.tb-modal-form-row > * {
  flex: 1 1 0;
  min-width: 0;
}

/* Section titles within modals */
.tb-modal-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color-table, #333);
  margin-bottom: 10px;
  margin-top: 10px;
}

/* Icon button in modal header */
.tb-modal-header-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s ease;
}

.tb-modal-header-icon:hover {
  color: var(--primary-color, #007bff);
}

.tb-modal-text {
  color: var(--text-color-table, #333);
}
