/* style2.css - Generalized styles for forms, tables, and common UI elements */

/* =============================================================================
   Tables
   ========================================================================== */

table.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  margin-bottom: 1em;
}

table.data-table th,
table.data-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

table.data-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

table.data-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

table.data-table a {
  color: #0066cc;
  text-decoration: none;
}

table.data-table a:hover {
  text-decoration: underline;
}

/* Collapsible table cells (for admin_tools) */
.collapsible-cell {
  max-width: 200px;
}

.expand-btn {
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.9em;
}

.cell-content {
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.cell-content.hidden {
  display: none;
}

.cell-content pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 0.85em;
  background-color: #f5f5f5;
  padding: 8px;
  border-radius: 4px;
}

/* =============================================================================
   Forms
   ========================================================================== */

.form-group {
  margin-bottom: 1.5em;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 600px;
  padding: 0.5em;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.form-group textarea {
  font-family: inherit;
  resize: vertical;
}

.help-text {
  display: block;
  margin-top: 0.25em;
  color: #666;
  font-size: 0.9em;
}

.errors,
.errorlist {
  margin-top: 0.5em;
  list-style-type: none;
  padding: 0;
}

.error,
.errorlist li {
  color: #d32f2f;
  margin: 0.25em 0;
  font-size: 0.9em;
}

.form-actions {
  margin-top: 2em;
}

.form-actions button,
.form-actions .button,
.form-actions .button-secondary {
  padding: 0.75em 1.5em;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  margin-right: 1em;
  cursor: pointer;
  font-size: 1em;
}

.form-actions button,
.form-actions .button {
  background-color: #0066cc;
  color: white;
  border: none;
}

.form-actions button:hover,
.form-actions .button:hover {
  background-color: #0052a3;
}

.form-actions .button-secondary {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
}

.form-actions .button-secondary:hover {
  background-color: #e0e0e0;
}

/* =============================================================================
   Action Links
   ========================================================================== */

.action-links {
  margin: 1em 0;
}

.action-links a {
  color: #0066cc;
  text-decoration: none;
}

.action-links a:hover {
  text-decoration: underline;
}

/* =============================================================================
   Lists
   ========================================================================== */

.simple-list {
  list-style-type: none;
  padding: 0;
  margin: 1em 0;
}

.simple-list li {
  padding: 0.5em 0;
  border-bottom: 1px solid #eee;
}

.simple-list li:last-child {
  border-bottom: none;
}

.simple-list a {
  color: #0066cc;
  text-decoration: none;
}

.simple-list a:hover {
  text-decoration: underline;
}

/* =============================================================================
   Pagination
   ========================================================================== */

.pagination {
  margin-top: 1em;
  margin-bottom: 1em;
  text-align: center;
}

.pagination a {
  margin: 0 5px;
  padding: 5px 10px;
  text-decoration: none;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
}

.pagination a:hover {
  background-color: #e0e0e0;
}

.pagination .current-page {
  margin: 0 10px;
  font-weight: bold;
}

/* =============================================================================
   Content Sections
   ========================================================================== */

.content-section {
  margin: 1em 0;
  line-height: 1.6;
}

/* =============================================================================
   Status Colors
   ========================================================================== */

.status-success {
  color: green;
}

.status-warning {
  color: orange;
}

.status-error,
.status-canceled {
  color: #d32f2f;
}

.status-info {
  color: #0066cc;
}

/* =============================================================================
   Inline Forms
   ========================================================================== */

.inline-form {
  display: inline;
}

/* =============================================================================
   Spacing Utilities
   ========================================================================== */

.margin-bottom-1 {
  margin-bottom: 1em;
}
