/* ----------------------------------
   Phase 1: CRUD Prototype Styling
   Part of Bells & Whistles Designs
-------------------------------------*/

/* Container for the CRUD app */
.crud-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Section */
.crud-header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  color: #1a202c; /* matches site palette */
}

.crud-header p.crud-description {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1rem;
}

#addProjectBtn {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  border: none;
  border-radius: 5px;
  background-color: #4f46e5; /* primary brand color */
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

#addProjectBtn:hover {
  background-color: #3730a3;
}

/* Inline Add Project Form */
.crud-add-project {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #f9fafb;
}

.crud-add-project h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

.form-group label {
  
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: black;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.5rem;
  font-size: 0.95rem;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #4f46e5;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Buttons */
button {
  font-family: inherit;
  border: none;
  border-radius: 5px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.btn-primary {
  background-color: #4f46e5;
  color: white;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #3730a3;
}

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

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

.btn-danger {
  background-color: #dc2626;
  color: white;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

/* Table Styling */
.crud-list {
  margin-top: 1rem;
  overflow-x: auto;
}

.crud-table {
  width: 100%;
  border-collapse: collapse;
}

.crud-table th,
.crud-table td {
  color: #0f0f0f;
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.crud-table th {
  background-color: #f3f4f6;
  font-weight: 600;
}

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

/* Empty state */
.empty-state {
  text-align: center;
  font-style: italic;
  color: #6b7280;
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}
.image-preview {
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-preview img {
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .crud-table th,
  .crud-table td {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  #addProjectBtn {
    width: 100%;
  }
}
