/* ===== Components — reusable pieces: buttons, code blocks, toast. ===== */

.button-primary {
  display: inline-flex;
  align-items: center;
  gap: 23px;
  padding: 13px 23px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s,transform .2s;
}

.button-primary:hover {
  background: #244b33;
  transform: translateY(-2px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 550;
}

.text-link:hover {
  color: var(--green);
}

.code-block {
  background: #26322a;
  border: 1px solid #26322a;
  border-radius: 7px;
  margin-top: 13px;
  overflow: hidden;
}

.code-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 15px;
  border-bottom: 1px solid #ffffff10;
  font: 9px var(--mono);
  letter-spacing: .5px;
  color: #a5b59a;
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  padding: 4px 7px;
  color: #c7d7bc;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  min-height: 28px;
  transition: background .2s;
}

.copy-button:hover {
  background: #ffffff0c;
  border-color: #ffffff1a;
}

pre {
  margin: 0;
  padding: 17px 20px;
  overflow-x: auto;
  color: #e3edda;
  font: 13px/1.95 var(--mono);
  tab-size: 2;
}

pre:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -3px;
}

.code-highlight {
  color: #c5e89f;
}

.inline-code {
  font: 11px var(--mono);
  padding: 2px 4px;
  color: var(--green);
  background: #eaf0df;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%,15px);
  background: var(--ink);
  color: #e9f1e2;
  padding: 11px 20px;
  border: 1px solid #506248;
  border-radius: 7px;
  box-shadow: 0 7px 22px #20302725;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s,transform .2s;
  z-index: 20;
  max-width: calc(100% - 32px);
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%,0);
}

@media (max-width:760px) {
  pre {
    font-size: 11px;
    padding: 13px;
  }
  .code-top {
    padding: 6px 9px;
  }
}

@media (max-width:380px) {
  .button-primary {
    padding: 12px 18px;
    gap: 17px;
  }
  .text-link {
    font-size: 12px;
  }
}
