/* styles/tnc-templates.css */

/* Layout for the category cards */
.template-categories-container {
  display: grid;
  /* This creates responsive columns. On large screens, up to 2 columns. On smaller screens, 1 column. */
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 25px; /* Spacing between cards */
}

/* Style for the card header icon */
.card-header h2 i {
  margin-right: 12px;
  color: #007bff; /* Align with primary color */
  width: 25px;
  text-align: center;
}

/* Container for the list of templates inside a card */
.template-list {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Spacing between template items */
}

/* Individual template item styling */
.template-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Align to the top */
  padding: 15px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background-color: #fdfdfd;
  transition: all 0.2s ease-in-out;
}

.template-item:hover {
  border-color: #b3d7ff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
  transform: translateY(-2px);
}

.template-info {
  flex-grow: 1;
  margin-right: 15px;
}

.template-title {
  font-weight: 600;
  color: #343a40;
  margin: 0 0 5px 0;
  font-size: 0.95em;
}

.template-text {
  margin: 0;
  color: #6c757d;
  font-size: 0.9em;
  line-height: 1.5;
  /* Prevents very long text from breaking layout */
  white-space: pre-wrap; /* Respects newlines and wraps text */
  word-break: break-word;
}

/* Action buttons are inherited, but this ensures they don't shrink */
.template-item .action-buttons {
  flex-shrink: 0;
}

/* No templates message */
.no-templates-message {
  text-align: center;
  color: #868e96;
  padding: 20px;
  font-style: italic;
  background-color: #f8f9fa;
  border-radius: 6px;
}

/* Modal form adjustments */
#template-form .form-control {
  margin-bottom: 5px; /* Add a bit of space */
}

#template-form textarea.form-control {
  height: 120px;
  resize: vertical; /* Allow user to resize textarea vertically */
  line-height: 1.6;
}
