/* Config Page Styles */

/* Loader */
.loader {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  border-radius: 24px;
  transition: 0.3s;
}
.slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle input:checked + .slider {
  background-color: #10b981;
}
.toggle input:checked + .slider::before {
  transform: translateX(20px);
}

/* Searchable Select / Dropdown */
.searchable-select {
  position: relative;
}
.searchable-select .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.searchable-select .dropdown.open {
  display: block;
}
.searchable-select .dropdown-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  border-bottom: 1px solid #f3f4f6;
}
.searchable-select .dropdown-item:hover {
  background: #eff6ff;
}
.searchable-select .dropdown-item:last-child {
  border-bottom: none;
}
.searchable-select .dropdown-item .code {
  color: #6b7280;
  font-size: 0.75rem;
}
.searchable-select .dropdown-loading {
  padding: 0.75rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Collapse Icon */
.collapse-icon {
  transition: transform 0.2s;
}
.store-config:not(.hidden) ~ .store-header .collapse-icon,
.store-card.expanded .collapse-icon {
  transform: rotate(180deg);
}

/* Store Card */
.store-card {
  transition: box-shadow 0.2s;
}
.store-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

/* GL Account Row */
.gl-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.gl-row:last-child {
  border-bottom: none;
}
.gl-row label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
.gl-row .hint {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Status Badge */
.status-badge {
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
