/**
 * Feature List sheet – slide-in from right, matches Figma/HTML.
 */

.feature-list-sheet-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2050;
  display: flex;
  justify-content: flex-end;
  animation: feature-list-overlay-in 0.2s ease-out;
}

@keyframes feature-list-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.feature-list-sheet {
  background: #fff;
  width: 100%;
  max-width: 36rem;
  height: 100%;
  border-left: 1px solid #e5e7eb;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: feature-list-sheet-in 0.3s ease-out;
}

@keyframes feature-list-sheet-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@media (min-width: 640px) {
  .feature-list-sheet { max-width: 28rem; }
}
@media (min-width: 768px) {
  .feature-list-sheet { max-width: 32rem; }
}
@media (min-width: 1024px) {
  .feature-list-sheet { max-width: 36rem; }
}

.feature-list-sheet-header {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.feature-list-sheet-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.feature-list-sheet-subtitle {
  font-size: 0.875rem;
  color: #4b5563;
  margin: 0;
}

.feature-list-sheet-search-wrap {
  position: relative;
  padding: 0 1rem 0.75rem;
  flex-shrink: 0;
}

.feature-list-sheet-search-icon {
  position: absolute;
  left: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: #9ca3af;
  pointer-events: none;
}

.feature-list-sheet-search {
  width: 100%;
  height: 2.25rem;
  padding: 0.25rem 0.75rem 0.25rem 2.25rem;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #f9fafb;
  color: #111827;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.feature-list-sheet-search::placeholder {
  color: #9ca3af;
}

.feature-list-sheet-search:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.feature-list-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem 1rem;
}

.feature-list-sheet-loading,
.feature-list-sheet-empty {
  padding: 2rem 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

.feature-list-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  padding: 1rem;
  transition: border-color 0.15s, background-color 0.15s;
}

.feature-list-card:hover {
  border-color: #d1d5db;
}

.feature-list-card-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.feature-list-card-content {
  flex: 1;
  min-width: 0;
}

.feature-list-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  margin: 0 0 0.25rem 0;
}

.feature-list-card-desc {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
}

.feature-list-card-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.feature-list-toggle {
  display: inline-flex;
  height: 1.15rem;
  width: 2rem;
  flex-shrink: 0;
  align-items: center;
  border-radius: 9999px;
  background: #e5e7eb;
  border: 1px solid transparent;
  transition: background 0.2s;
}

.feature-list-toggle-on {
  background: #111827;
}

.feature-list-toggle-thumb {
  display: block;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
  transform: translateX(2px);
}

.feature-list-toggle-on .feature-list-toggle-thumb {
  transform: translateX(calc(100% - 2px));
}

.feature-list-status-label {
  font-size: 0.75rem;
  font-weight: 500;
  width: 4rem;
}

.feature-list-status-enabled {
  color: #059669;
}

.feature-list-status-disabled {
  color: #6b7280;
}

.feature-list-sheet-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 0.25rem;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.feature-list-sheet-close:hover {
  opacity: 1;
}

.feature-list-sheet-close:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.feature-list-sheet-close-icon {
  width: 1rem;
  height: 1rem;
}
