/* ========== UI Kit shell styling (not part of app design) ========== */

.kit-header {
  padding: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: #fff;
}

.kit-header__title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
}

.kit-header__meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.75;
}

.kit {
  padding: 20px;
  display: grid;
  gap: 28px;
}

.kit-link {
  margin-top: 1rem;
  display: block;
}

.kit-section__head {
  margin-bottom: 12px;
}

.kit-section__title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
}

.kit-section__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.75;
}

/* Fake device wrapper so screens render at exactly the XD artboard size */
.device {
  width: var(--device-w);
  margin: 0;
  padding: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* The viewport itself */
.device__screen {
  width: var(--device-w);
  height: var(--device-h);
  border-radius: 16px;
  overflow-y: scroll;
  background: var(--color-offwhite);
  border: 1px solid rgba(0,0,0,0.08);
    /* Hide scrollbar */
  scrollbar-width: none;          /* Firefox */
}

.device__screen::-webkit-scrollbar{
  display: none;                  /* Chrome, Safari */
}

/* Ensure included screens fill the viewport edge-to-edge */
.device__screen > * {
  width: 100%;
  height: 100%;
}

.kit-component{
  margin: 1.25rem 0;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.kit-component__preview{
  padding: 0; /* keep exact component edges */
}

.kit-component__meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: #fafafa;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.kit-component__title{
  font-weight: 600;
  font-size: 0.95rem;
}

.kit-copy{
  appearance: none;
  border: 1px solid rgba(0,0,0,0.25);
  background: #fff;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.kit-copy[disabled]{
  opacity: 0.7;
  cursor: default;
}

.kit-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1100px){
  .kit-row{
    grid-template-columns: 420px 1fr; /* device left, code right */
    align-items: start;
  }
}

.kit-codepanel{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.kit-codepanel__head{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #fafafa;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.kit-codeblock__bar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #f7f7f7;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 0.9rem;
}

.kit-code{
  margin: 0;
  padding: 0.75rem 1rem;
  background: #111;
  color: #eee;
  overflow: auto;
  font-size: 0.85rem;
  line-height: 1.35;
  max-height: 10rem;
}

.kit-code code{
  white-space: pre;
}

.kit-codeblock__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0.75rem 1rem 1rem;
  background: #fff;
}

@media (min-width: 900px){
  .kit-codeblock__grid{
    grid-template-columns: 1fr 1fr;
  }
}

.kit-codecol{
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  overflow: hidden;
  background: #111; /* matches code block */
}

.kit-codecol__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  background: #f2f2f2;
  color: #111;
  border-bottom: 1px solid rgba(0,0,0,0.10);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 0.9rem;
}

/* Let the inner <pre> fill the column nicely */
.kit-codecol .kit-code{
  border-radius: 0;
  padding: 0.75rem;
}

.kit-callout{
  margin: 2rem auto 3rem;
  max-width: 1100px;
  background: #f9f9f9;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
}

.kit-callout__title{
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.kit-callout__steps{
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.kit-callout__steps li{
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.kit-callout__steps ul{
  margin: 0.4rem 0 0.6rem 1.25rem;
}

.kit-callout__note{
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 0.95rem;
  line-height: 1.4;
}

.kit-callout code{
  background: rgba(0,0,0,0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}
