/* ============================================================
   style-regulasi.css
   CSS untuk Modul Regulasi Sakatoplan
   ============================================================ */

/* ============================================================
   1. TOMBOL REGULASI
   ============================================================ */
.btn-regulasi {
  padding: 10px 24px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  background: linear-gradient(135deg, #FF6B35, #F7931E);
  color: white;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
  margin-left: 10px;
}

.btn-regulasi:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-regulasi i {
  margin-right: 8px;
}

/* ============================================================
   2. MODAL REGULASI
   ============================================================ */
.modal-regulasi {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-regulasi.show {
  display: block;
}

.modal-content-regulasi {
  background-color: #fefefe;
  margin: 3% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header-regulasi {
  padding: 18px 24px;
  background: linear-gradient(135deg, #FF6B35, #F7931E);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.modal-header-regulasi h3 {
  margin: 0;
  font-weight: 600;
  font-size: 1.3rem;
}

.modal-header-regulasi h3 i {
  margin-right: 10px;
}

.close-btn-regulasi {
  color: white;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-btn-regulasi:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-body-regulasi {
  padding: 24px;
  max-height: 65vh;
  overflow-y: auto;
  background: #f8f9fa;
  flex: 1;
}

.modal-footer-regulasi {
  padding: 12px 24px;
  background: #fff;
  border-top: 1px solid #dee2e6;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-radius: 0 0 12px 12px;
  flex-shrink: 0;
}

.btn-close-regulasi {
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  background: #6c757d;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-close-regulasi:hover {
  background: #5a6268;
}

/* ============================================================
   3. KONTEN REGULASI
   ============================================================ */
.regulasi-content {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.regulasi-content h4 {
  color: #FF6B35;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid #FF6B35;
}

.regulasi-content .regulasi-item {
  padding: 12px 16px;
  margin-bottom: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #FF6B35;
  transition: all 0.3s ease;
  cursor: pointer;
}

.regulasi-content .regulasi-item:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.regulasi-content .regulasi-item .title {
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.regulasi-content .regulasi-item .title i {
  color: #FF6B35;
}

.regulasi-content .regulasi-item .desc {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 4px;
  display: none;
}

.regulasi-content .regulasi-item.active .desc {
  display: block;
}

.regulasi-content .regulasi-item .badge-status {
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 20px;
  background: #28a745;
  color: white;
}

.regulasi-content .regulasi-item .badge-status.aktif {
  background: #28a745;
}

.regulasi-content .regulasi-item .badge-status.revisi {
  background: #ffc107;
  color: #212529;
}

.regulasi-content .regulasi-item .badge-status.baru {
  background: #17a2b8;
}

.regulasi-loader {
  text-align: center;
  padding: 40px;
  display: none;
}

.regulasi-loader .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #FF6B35;
  border-radius: 50%;
  animation: spinRegulasi 0.8s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spinRegulasi {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ============================================================
   4. TAB REGULASI
   ============================================================ */
.regulasi-tabs {
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 4px;
  padding-bottom: 2px;
}

.regulasi-tabs .nav-item {
  margin-bottom: -2px;
}

.regulasi-tabs .nav-link {
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #6c757d;
  transition: all 0.3s ease;
  background: transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.regulasi-tabs .nav-link:hover {
  color: #FF6B35;
  background: rgba(255, 107, 53, 0.05);
}

.regulasi-tabs .nav-link.active {
  color: #FF6B35;
  background: transparent;
  border-bottom: 3px solid #FF6B35;
}

.regulasi-tabs .nav-link .badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 20px;
}

.regulasi-tabs .nav-link .badge.bg-secondary {
  background: #6c757d !important;
}

.regulasi-tabs .nav-link .badge.bg-primary {
  background: #0d6efd !important;
}

.regulasi-tabs .nav-link .badge.bg-success {
  background: #198754 !important;
}

.regulasi-tabs .nav-link .badge.bg-warning {
  background: #ffc107 !important;
  color: #212529 !important;
}

.regulasi-tabs .nav-link .badge.bg-info {
  background: #0dcaf0 !important;
}

.regulasi-tab-content {
  padding-top: 4px;
}

/* ============================================================
   5. KATEGORI REGULASI
   ============================================================ */
.regulasi-kategori {
  margin-bottom: 24px;
}

.regulasi-kategori:last-child {
  margin-bottom: 0;
}

.kategori-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 4px solid #FF6B35;
}

.kategori-header i {
  font-size: 1.2rem;
}

.kategori-header h5 {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: #2c3e50;
  flex: 1;
}

.kategori-header .badge {
  font-size: 0.7rem;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ============================================================
   6. TOMBOL AKSI
   ============================================================ */
.action-buttons {
  text-align: center;
  margin-top: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.btn-survey-action {
  padding: 10px 24px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  background-color: #007BFF;
  color: white;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-survey-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
  color: white;
}

.btn-survey-action a {
  color: white;
  text-decoration: none;
}

.btn-survey-action a:hover {
  color: white;
}

.btn-download {
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  background: #28a745;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-download:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* ============================================================
   7. RESPONSIVE REGULASI
   ============================================================ */
@media (max-width: 768px) {
  .modal-content-regulasi {
    width: 95%;
    margin: 5% auto;
    max-height: 95vh;
  }
  .modal-body-regulasi {
    max-height: 55vh;
    padding: 16px;
  }
  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .btn-regulasi {
    margin-left: 0;
  }
  .regulasi-content .regulasi-item .title {
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 576px) {
  .modal-header-regulasi h3 {
    font-size: 1rem;
  }
  .modal-header-regulasi {
    padding: 14px 16px;
  }
  .modal-body-regulasi {
    padding: 12px;
    max-height: 50vh;
  }
  .regulasi-content {
    padding: 16px;
  }
  .regulasi-tabs .nav-link {
    font-size: 0.75rem;
    padding: 8px 12px;
  }
  .regulasi-tabs .nav-link .badge {
    font-size: 0.55rem;
    padding: 1px 6px;
  }
  .kategori-header {
    flex-wrap: wrap;
    gap: 6px;
  }
  .kategori-header h5 {
    font-size: 0.85rem;
    width: 100%;
  }
}