/* File: src/css/accesscore/toolbar.css
   AccessCore FAB + drawer chrome. Scoped by class names beginning with
   `accesscore-` or `ac-`. Does not affect any other page content. */

.accesscore-fab {
  position: fixed;
  bottom: 1rem;
  inset-inline-start: 1rem;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: #1a202c;
  color: #f7fafc;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.accesscore-fab:hover { background: #2d3748; transform: translateY(-1px); }
.accesscore-fab:focus-visible {
  outline: 3px solid #f6ad55;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .accesscore-fab { bottom: 4rem; }
}

.accesscore-drawer {
  position: fixed;
  bottom: 5.5rem;
  inset-inline-start: 1rem;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(720px, calc(100vh - 8rem));
  overflow-y: auto;
  background: #ffffff;
  color: #1a202c;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  z-index: 9998;
  padding: 1rem 1.15rem 1.15rem;
  direction: rtl;
  font-family: 'Assistant', system-ui, sans-serif;
}
.accesscore-drawer:focus-visible {
  outline: 3px solid #667eea;
  outline-offset: -3px;
}

.ac-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.75rem;
}
.ac-drawer-header h2 {
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
}
.ac-btn-close {
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.4rem;
}
.ac-btn-close:focus-visible { outline: 3px solid #667eea; }

.ac-section { margin-block: 0.85rem; }
.ac-section h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #718096;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.ac-slider-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 0.5rem;
  padding-block: 0.4rem;
}
.ac-slider-label { font-size: 0.85rem; color: #2d3748; }
.ac-slider-row input[type="range"] { width: 100%; }
.ac-slider-value {
  font-family: 'Recursive', ui-monospace, monospace;
  font-size: 0.75rem;
  color: #4a5568;
  justify-self: end;
}

.ac-radio-group {
  border: 1px solid #e2e8f0;
  padding: 0.6rem 0.75rem 0.75rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ac-radio-group legend {
  font-size: 0.8rem;
  padding-inline: 0.35rem;
  color: #2d3748;
}
.ac-radio-row,
.ac-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #2d3748;
  padding-block: 0.25rem;
  cursor: pointer;
}
.ac-radio-row input,
.ac-toggle-row input { accent-color: #667eea; }

.ac-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.9rem;
  margin-top: 0.6rem;
  border-top: 1px solid #e2e8f0;
}
.ac-btn-reset {
  background: #fed7d7;
  border: 1px solid #f56565;
  color: #742a2a;
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}
.ac-btn-reset:focus-visible { outline: 3px solid #667eea; outline-offset: 2px; }
.ac-drawer-link {
  font-size: 0.8rem;
  color: #667eea;
  text-decoration: none;
}
.ac-drawer-link:hover { text-decoration: underline; }
.ac-drawer-link:focus-visible {
  text-decoration: underline;
  outline: 2px solid #667eea;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Respect OS-level reduced motion for the drawer's own transitions. */
@media (prefers-reduced-motion: reduce) {
  .accesscore-fab,
  .accesscore-drawer,
  .accesscore-drawer * {
    transition: none !important;
    animation: none !important;
  }
}
