/* Configuration page styles */

.config-menu-card {
  position: sticky;
  top: 10px;
  margin-bottom: 1rem;
}

.config-menu .nav-link {
  color: #495057;
  border-radius: 0.25rem;
  margin-bottom: 0.25rem;
  padding: 0.75rem 1rem;
  transition: all 0.15s ease-in-out;
}

.config-menu .nav-link:hover {
  background-color: #f8f9fa;
  color: #212529;
}

.config-menu .nav-link.active {
  background-color: #007bff;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.config-menu .nav-icon {
  width: 24px;
  text-align: center;
  margin-right: 0.5rem;
}

.tab-pane > .card {
  margin-bottom: 1rem;
}

/* QRIS mode cards */
.qris-preview {
  max-height: 320px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.mode-label {
  cursor: pointer;
  display: block;
  margin-bottom: 0;
}

.mode-card {
  cursor: pointer;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 16px;
  transition: all .15s;
}

.mode-card:hover {
  border-color: #adb5bd;
}

input:checked + .mode-card {
  border-color: #007bff;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, .15);
}

input:checked + .mode-card .mode-check {
  opacity: 1;
}

.mode-check {
  opacity: 0;
  transition: opacity .15s;
}

/* Company logo preview */
.company-logo-preview {
  max-height: 160px;
  max-width: 160px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

/* Dark mode adjustments */
body.dark-mode .config-menu .nav-link {
  color: #ced4da;
}

body.dark-mode .config-menu .nav-link:hover {
  background-color: #343a40;
  color: #fff;
}

body.dark-mode .config-menu .nav-link.active {
  background-color: #3f6791;
  color: #fff;
}

body.dark-mode .mode-card {
  border-color: #454d55;
  background: #343a40;
}

body.dark-mode .mode-card:hover {
  border-color: #6c757d;
}

body.dark-mode input:checked + .mode-card {
  border-color: #3f6791;
  background: #2c3b52;
  box-shadow: 0 0 0 3px rgba(63, 103, 145, 0.3);
}

body.dark-mode .company-logo-preview,
body.dark-mode .qris-preview {
  background: #343a40;
  border-color: #454d55;
}

body.dark-mode pre {
  background-color: #343a40 !important;
  color: #f8f9fa;
}

body.dark-mode .alert-info {
  background-color: #1f4e68;
  border-color: #2a6f94;
  color: #d1ecf1;
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
  .config-menu-card {
    position: static;
    margin-bottom: 1rem;
  }

  .config-menu {
    flex-direction: row !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .config-menu .nav-link {
    white-space: nowrap;
    margin-bottom: 0;
    margin-right: 0.25rem;
  }
}

@media (max-width: 575.98px) {
  .config-menu .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .config-menu .nav-icon {
    margin-right: 0.25rem;
  }
}
