/* Equipment Management Plugin Styles */

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 3px;
}

.badge-success {
  background-color: #27ae60;
}

.badge-warning {
  background-color: #f39c12;
}

.badge-danger {
  background-color: #e74c3c;
}

.badge-info {
  background-color: #3498db;
}

.badge-primary {
  background-color: #2980b9;
}

.badge-secondary {
  background-color: #95a5a6;
}

.badge-light {
  background-color: #ecf0f1;
  color: #2c3e50;
}

/* Text colors */
.text-success {
  color: #27ae60 !important;
}

.text-warning {
  color: #f39c12 !important;
}

.text-danger {
  color: #e74c3c !important;
}

.text-info {
  color: #3498db !important;
}

/* Equipment status styles */
.equipment-stats {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
}

/* Checklist item styles */
.checklist-item {
  transition: border-color 0.3s;
}

.checklist-item:hover {
  border-color: #3498db !important;
}

.response-options label {
  cursor: pointer;
  padding: 5px 10px;
  margin-right: 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
  display: inline-block;
}

.response-options label:hover {
  background-color: #ecf0f1;
}

.response-options input[type="radio"]:checked + label {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
}

/* Defect detail box */
#defect_detail_box {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  margin-top: 10px;
}

/* Status indicators */
.status-ok {
  color: #27ae60;
}

.status-not-ok {
  color: #e74c3c;
}

.status-na {
  color: #95a5a6;
}

/* Severity indicators */
.severity-high {
  color: #e74c3c;
  font-weight: bold;
}

.severity-medium {
  color: #f39c12;
  font-weight: bold;
}

.severity-low {
  color: #3498db;
}

/* Priority rows */
tr.priority-high {
  background-color: #fee !important;
}

tr.priority-high:hover {
  background-color: #fdd !important;
}

/* Collapsible fieldsets */
fieldset.collapsible {
  border: 1px solid #ddd;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
}

fieldset.collapsible legend {
  cursor: pointer;
  padding: 5px 10px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-weight: bold;
}

fieldset.collapsible legend:hover {
  background: #ecf0f1;
}

fieldset.collapsible.collapsed legend:before {
  content: "▶ ";
}

fieldset.collapsible:not(.collapsed) legend:before {
  content: "▼ ";
}

fieldset.collapsible.collapsed > div {
  display: none !important;
}

/* QR Code display */
.qr-code-container {
  text-align: center;
  padding: 20px;
  background: white;
  border: 1px solid #ddd;
  display: inline-block;
  border-radius: 5px;
}

/* Flash messages customization */
.flash.notice {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.flash.error {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.flash.warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

/* Equipment info layout */
.equipment-info {
  margin-bottom: 20px;
}

.splitcontentleft,
.splitcontentright {
  width: 48%;
  float: left;
}

.splitcontentright {
  float: right;
}

/* Defect photos grid */
.defect-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

/* Table improvements */
table.list.equipment td,
table.list.defects td {
  vertical-align: middle;
}

/* Button improvements */
.button-small {
  padding: 4px 10px;
  font-size: 12px;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .splitcontentleft,
  .splitcontentright {
    width: 100%;
    float: none;
  }
  
  .defect-photos {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .response-options label {
    display: block;
    margin-bottom: 5px;
  }
}

/* Icon additions */
.icon-qrcode:before {
  content: "📱";
  margin-right: 3px;
}

.icon-back:before {
  content: "←";
  margin-right: 3px;
}

/* Progress bar for checklist completion */
.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #ecf0f1;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar-fill {
  height: 100%;
  background-color: #27ae60;
  transition: width 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Attachments preview */
.attachment-preview {
  max-width: 200px;
  max-height: 200px;
  border: 1px solid #ddd;
  padding: 5px;
  margin: 5px;
  cursor: pointer;
  transition: transform 0.2s;
}

.attachment-preview:hover {
  transform: scale(1.05);
  border-color: #3498db;
}
