/* components.css - Cards, callouts, database table, buttons, forms */

/* Callout boxes */
.callout {
  padding: 1rem;
  border-radius: 0.25rem;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.callout:hover {
  border-color: #d1d5db;
}

.callout-icon {
  font-size: 1.5rem;
}

.callout-title {
  font-weight: 600;
  color: #111827;
}

.callout-text {
  color: #374151;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

/* Database table styling */
.db-table {
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.db-header {
  display: grid;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.db-row {
  display: grid;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  transition: background-color 0.15s;
  cursor: pointer;
}

.db-row:hover {
  background-color: #f9fafb;
}

.db-row:last-child {
  border-bottom: none;
}

.db-cell {
  padding: 0.75rem;
  border-right: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
}

.db-cell:last-child {
  border-right: none;
}

/* Cards */
.card {
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  padding: 1rem;
  transition: background-color 0.15s;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card:hover {
  background-color: #f9fafb;
}

.card-image {
  height: 8rem;
  background-color: #f3f4f6;
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.card:hover .card-image img {
  opacity: 0.8;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.card-title span {
  font-weight: 500;
  color: #1f2937;
  text-decoration: underline;
  text-decoration-color: #d1d5db;
  text-underline-offset: 2px;
}

.card-desc {
  font-size: 0.75rem;
  color: #6b7280;
  padding-left: 1.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* Form components */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background-color: white;
  cursor: pointer;
}

.form-textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  min-height: 120px;
  resize: vertical;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.form-checkbox input {
  margin-top: 0.25rem;
}

.form-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Tags/badges */
.tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Confirmation message */
.confirmation {
  background-color: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.confirmation-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.confirmation-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #166534;
  margin-bottom: 0.5rem;
}

.confirmation-text {
  color: #15803d;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Add new row button in database */
.db-add-row {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.75rem;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.15s;
}

.db-add-row:hover {
  color: #4b5563;
}
