/* Custom CSS untuk Form Triase IGD */

/* Panel styling */
.panel {
  margin-bottom: 20px;
  background-color: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
  box-shadow: 0 1px 1px rgba(0,0,0,.05);
}

.panel-heading {
  padding: 10px 15px;
  border-bottom: 1px solid transparent;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

.panel-title {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 16px;
  color: inherit;
}

.panel-body {
  padding: 15px;
}

/* Fieldset styling */
fieldset {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
  background-color: #fafafa;
}

legend {
  width: auto;
  padding: 0 10px;
  border: none;
  font-size: 16px;
  font-weight: bold;
  color: #337ab7;
  margin-bottom: 15px;
}

/* Styling untuk kategori triase */
.triase-merah {
    background-color: #d9534f !important;
    color: white !important;
    border-color: #d43f3a !important;
}

.triase-kuning {
    background-color: #f0ad4e !important;
    color: white !important;
    border-color: #eea236 !important;
}

.triase-hijau {
    background-color: #5cb85c !important;
    color: white !important;
    border-color: #4cae4c !important;
}

.triase-hitam {
    background-color: #333 !important;
    color: white !important;
    border-color: #222 !important;
}

/* Styling untuk form triase */
#triase_igd .panel {
    margin-bottom: 15px;
}

#triase_igd .form-group {
    margin-bottom: 10px;
}

#triase_igd .control-label {
  font-weight: bold;
  color: #333;
}

/* Styling untuk kategori triase */
.triase-merah {
  background-color: #d9534f !important;
  color: white !important;
  font-weight: bold !important;
}

.triase-kuning {
  background-color: #f0ad4e !important;
  color: white !important;
  font-weight: bold !important;
}

.triase-hijau {
  background-color: #5cb85c !important;
  color: white !important;
  font-weight: bold !important;
}

.triase-hitam {
  background-color: #333 !important;
  color: white !important;
  font-weight: bold !important;
}

/* Styling untuk tombol manual override */
#btn_manual_override {
  font-size: 12px;
  padding: 4px 8px;
}

/* Styling untuk field yang auto-calculated */
.auto-calculated {
  border: 2px solid #5bc0de;
  box-shadow: 0 0 5px rgba(91, 192, 222, 0.5);
}

/* Indicator untuk kategori prioritas */
.priority-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.priority-merah {
  background-color: #d9534f;
}

.priority-kuning {
  background-color: #f0ad4e;
}

.priority-hijau {
  background-color: #5cb85c;
}

.priority-hitam {
  background-color: #333;
}

#triase_igd .text-danger {
    color: #d9534f;
}

/* Styling untuk GCS calculator */
#total_gcs {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    background-color: #f5f5f5;
}

/* Styling untuk tanda vital */
.vital-signs .form-control {
    text-align: center;
}

/* Styling untuk kategori dropdown */
select[name="kategori"] option {
    padding: 5px;
    font-weight: bold;
}

/* Styling untuk panel headers */
.panel-primary > .panel-heading {
    background-color: #337ab7;
    border-color: #2e6da4;
}

.panel-warning > .panel-heading {
    background-color: #f0ad4e;
    border-color: #eea236;
}

.panel-success > .panel-heading {
    background-color: #5cb85c;
    border-color: #4cae4c;
}

.panel-info > .panel-heading {
    background-color: #5bc0de;
    border-color: #46b8da;
}

.panel-danger > .panel-heading {
    background-color: #d9534f;
    border-color: #d43f3a;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #triase_igd .col-md-6,
    #triase_igd .col-md-4,
    #triase_igd .col-md-3 {
        margin-bottom: 10px;
    }
    
    #triase_igd .control-label {
        text-align: left !important;
        margin-bottom: 5px;
    }
}

/* Styling untuk badges dan labels */
.badge-lg {
    font-size: 14px;
    padding: 8px 12px;
}

.label-lg {
    font-size: 14px;
    padding: 8px 12px;
}

/* Styling untuk well */
.well-sm {
    padding: 9px;
    border-radius: 3px;
}

/* Animation untuk form validation */
.has-error .form-control {
    border-color: #d9534f;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px #ce8483;
}

.has-success .form-control {
    border-color: #5cb85c;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px #97c797;
}

/* Loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Highlight untuk field required */
.required-field {
    position: relative;
}

.required-field::after {
    content: " *";
    color: #d9534f;
    font-weight: bold;
}

/* Styling untuk readonly fields */
.form-control[readonly] {
    background-color: #f5f5f5;
    opacity: 1;
}

/* Custom styling untuk bootbox */
.bootbox-success .modal-header {
    background-color: #5cb85c;
    color: white;
}

.bootbox-error .modal-header {
    background-color: #d9534f;
    color: white;
}

.bootbox-warning .modal-header {
    background-color: #f0ad4e;
    color: white;
}