/* OSHA Hazard System v0.2.0 — tuned for GeneratePress */

/* ==============================
   Layout & Typography
   ============================== */
.osha-form,
#osha-admin {
  max-width: 1200px;
  margin: 24px auto;
  padding: 16px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Ensure GP content width doesn’t constrain us too tightly */
.site-main .osha-form,
.site-main #osha-admin {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Headings inside plugin blocks */
#osha-admin h3, #osha-admin h4, #osha-admin h5,
.osha-form h3, .osha-form h4, .osha-form h5 {
  margin: 0 0 10px 0;
  font-weight: 600;
}

/* ==============================
   Fields
   ============================== */
.osha-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.osha-field label {
  font-size: 14px;
  font-weight: 500;
  color: #111827; /* gray-900 */
}

.osha-field input[type="text"],
.osha-field input[type="email"],
.osha-field input[type="password"],
.osha-field input[type="date"],
.osha-field input[type="time"],
.osha-field select,
.osha-field textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 8px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.osha-field textarea { min-height: 110px; }

.osha-field input:focus,
.osha-field select:focus,
.osha-field textarea:focus {
  outline: none;
  border-color: #2563eb; /* blue-600 */
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}

.osha-field small {
  color: #6b7280; /* gray-500 */
  font-size: 12px;
}

/* ==============================
   Buttons
   ============================== */
.osha-btn {
  background: #1e88e5;
  color: #fff;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color .15s ease, transform .05s ease;
}
.osha-btn:hover { background: #1669b5; }
.osha-btn:active { transform: translateY(1px); }
.osha-btn.small { font-size: 14px; padding: 8px 12px; }
.osha-btn.tiny { font-size: 12px; padding: 6px 10px; }

.osha-btn[disabled],
.osha-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ==============================
   Tabs (Admin)
   ============================== */
.osha-tabs {
  display: flex;
  gap: 8px;
  margin: 6px 0 14px 0;
  flex-wrap: wrap;
}
.osha-tablink {
  background: #f3f4f6; /* gray-100 */
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #374151; /* gray-700 */
}
.osha-tablink.active {
  background: #1e88e5;
  border-color: #1e88e5;
  color: #fff;
}
.osha-tab { display: none; }
.osha-tab.active { display: block; }

.osha-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 12px 0;
}

.osha-feedback {
  margin-top: 10px;
  font-size: 14px;
}

/* ==============================
   Reports
   ============================== */
.osha-report .osha-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 0;
}
.osha-report .osha-metrics > div {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
}

.osha-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.osha-table th, .osha-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px;
  text-align: left;
  vertical-align: top;
  background: #fff;
  font-size: 14px;
}
.osha-table th {
  background: #f9fafb; /* gray-50 */
  font-weight: 600;
}

.osha-table a { text-decoration: underline; }

/* Mobile scroll */
@media (max-width: 860px){
  .osha-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ==============================
   Mobile adjustments
   ============================== */
@media (max-width: 680px){
  .osha-form, #osha-admin { margin: 12px auto; padding: 12px; }
}

/* ==============================
   GeneratePress header/footer suppression
   (optional: only if you want dedicated look)
   ============================== */
header.site-header,
footer.site-footer {
  display: none;
}

h1, .entry-title {
  text-align: center;
  margin-bottom: 12px;
}
.site-footer {display:none;}

#osha-report-filters input {font-size:14px !important;}

.osha-report-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.osha-btn.danger { background: #dc2626; } /* red-600 */
.osha-btn.danger:hover { background: #b91c1c; }
