@import "./reset.css";
@import "./foundation.css";
@import "./grid.css";
@import "./nav.css";
@import "./tooltip.css";

html, body {
  overscroll-behavior-x: none;
}
.gridjs-wrapper {
  overscroll-behavior-x: none;
}

body {
  font-family: system-ui, sans-serif;
  scrollbar-width: thin;
}

.section {
  padding: 1rem;
}

.container {
  width: 100%;
  display: flex;
}

.output {
  min-height: 30vh;
}

.duration {
  color: var(--subtle-color);
}

#alert {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 999;

  max-width: 300px;
  margin: 0.5rem;
  padding: 0.75rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);

  background-color: var(--alert-color);

  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  border-radius: 10px;
}

.header {
  display: flex;
  justify-content: space-between;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-bottom: 1rem;
}

.expanded {
  background: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 92vw !important;
  height: 92vh !important;
  z-index: 999;
}

.table-item__summary {
  cursor: pointer;
}

.column-name {
  font-weight: bold;
}

#explorer-items {
  height: 80vh;
  overflow: auto;
}

#explorer-items > * {
  padding-top: var(--s0);
}

#settings {
  min-width: 30rem;
  width: 30rem;
}

.header {
  margin-bottom: var(--s1);
}

.spinner-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 9999;
}

.spinner {
  position: absolute;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.gridjs-th,
.gridjs-tr {
	font-family: monospace;
  overflow-wrap: break-word;
}

button {
  border-radius: 6px;
  background-color: #fff;
  border: 1px solid #d2d6dc;
  padding: 5px 14px;
  border: 1px solid $gray4;
}

button:hover {
  /* background-color: #f7f7f7; */
  background-color: var(--accent-color);
  color: white;
}

button:disabled:hover {
  background-color: #fff;
  color: #6b7280;
  cursor:default
}

.gridjs-pages button:hover {
  background-color: var(--accent-color) !important;
  color: white !important;
}

.gridjs-pages button:disabled:hover {
  background-color: #fff !important;
  color: #6b7280 !important;
  cursor:default !important;
}

/* Style the details element to hide the default indicator */
details summary {
  list-style: none; /* Removes the default indicator */
  cursor: pointer; /* Makes the summary clickable */
  position: relative;
  padding-left: 20px; /* Provides space for the indicator */
}

/* Create a custom indicator using ::before */
details summary::before {
  content: "+"; /* Default indicator */
  position: absolute;
  left: 0; /* Position the indicator on the left */
  font-weight: bold; /* Make the indicator bold */
}

/* When the details element is open, change the indicator to '-' */
details[open] summary::before {
  content: "-"; /* Indicator changes to minus */
}

@keyframes details-show {
  from {
    opacity:0;
    transform: var(--details-translate, translateY(-0.5em));
  }
}

details[open] > *:not(summary) {
  animation: details-show 150ms ease-in-out;
}
