/*
 * Additions to site.css (the original Acun UI design-system stylesheet; only its
 * corner radii were tightened): live x-ui previews in iframes, prop tables and
 * Markdown pages.
 */

.example-preview.frame-preview {
    display: none;
    padding: 0;
    min-height: 0;
    background: var(--surface);
}

.example-preview.frame-preview.active { display: block; }

.example-preview.frame-preview iframe {
    display: block;
    width: 100%;
    height: 180px;
    border: 0;
    background: transparent;
}

.example-code pre { margin: 0; overflow-x: auto; }
.example-code code { color: var(--code-text); font: 12.5px/1.7 'DM Mono', monospace; white-space: pre; }
.example-code .tag { color: #f47c77; }
.example-code .attr { color: #8fb4ff; }
.example-code .value { color: #9ee0b6; }
.example-code .directive { color: #f2c46d; }

.props-table { width: 100%; margin: 14px 0 28px; border: 1px solid var(--line); border-radius: 5px; border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 12.5px; }
.props-table th { padding: 10px 14px; background: var(--surface-subtle); color: var(--faint); font: 500 10px 'DM Mono', monospace; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.props-table td { padding: 11px 14px; border-top: 1px solid var(--line); color: var(--text); vertical-align: top; }
.props-table td:first-child code, .props-table td:nth-child(2) code { color: var(--ink); font: 12px 'DM Mono', monospace; }

.doc-note { margin: 14px 0 28px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 5px; background: var(--surface-subtle); color: var(--text); font-size: 13px; }

.doc-prose { max-width: 760px; color: var(--text); font-size: 14.5px; line-height: 1.7; }
.doc-prose h1 { margin: 0 0 12px; color: var(--ink); font-size: clamp(34px, 5vw, 48px); line-height: 1.1; letter-spacing: -.045em; }
.doc-prose h2 { margin: 44px 0 12px; color: var(--ink); font-size: 22px; letter-spacing: -.03em; scroll-margin-top: 90px; }
.doc-prose h3 { margin: 28px 0 8px; color: var(--ink); font-size: 16px; scroll-margin-top: 90px; }
.doc-prose p, .doc-prose ul, .doc-prose ol { margin: 0 0 14px; }
.doc-prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.doc-prose code { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-subtle); color: var(--ink); font: 12.5px 'DM Mono', monospace; }
.doc-prose pre { margin: 0 0 18px; padding: 18px 20px; border-radius: var(--radius); background: var(--code-bg); overflow-x: auto; }
.doc-prose pre code { padding: 0; border: 0; background: transparent; color: var(--code-text); white-space: pre; }
.doc-prose table { width: 100%; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 5px; border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 13px; }
.doc-prose th { padding: 9px 12px; background: var(--surface-subtle); color: var(--ink); text-align: left; }
.doc-prose td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.doc-prose blockquote { margin: 0 0 18px; padding: 12px 16px; border-left: 3px solid var(--brand); border-radius: 0 5px 5px 0; background: var(--surface-subtle); }
.doc-prose blockquote p:last-child { margin: 0; }

/* Live x-ui demos inside the original home sections. */
.demo-frame { display: block; width: 100%; height: 160px; border: 0; background: transparent; }
.preview-pane .demo-frame { align-self: stretch; }
.component-heading h2 a { color: inherit; }
.component-heading h2 a:hover { color: var(--brand-text); }
.example-tabs > span a { color: inherit; }
.example-tabs > span a:hover { color: var(--brand-text); }

/* Sidebar: collapsible sub-groups (Kartlar, UI öğeleri…) built from the groups
   in menu.json. Their rows line up with plain links; their pages are indented one step. */
.nav-sub > summary { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 7px 9px; border-radius: 4px; color: var(--muted); font-size: 14px; list-style: none; cursor: pointer; transition: color .15s, background .15s; }
.nav-sub > summary::-webkit-details-marker { display: none; }
.nav-sub > summary:hover { color: var(--ink); background: var(--surface-subtle); }
.nav-sub > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.nav-chevron { flex: none; width: 14px; height: 14px; color: var(--faint); transition: transform .15s; }
.nav-sub[open] > summary .nav-chevron { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .nav-chevron { transition: none; } }

/* PRO: components of the paid edition (menu.json "pro": true). */
.nav-group a .nav-pro { flex: none; margin-left: 8px; padding: 3px 6px; border-radius: 4px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand-text); font: 600 9.5px/1 'DM Mono', monospace; letter-spacing: .06em; }
.nav-group a > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.component-tags { display: flex; flex: 0 0 auto; align-items: flex-start; gap: 6px; }
.stability-tag.pro { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand-text); }

/* Active state as in the Acun UI panel sidebar (x-ui.nav.*): the current link, or the
   group that holds the current page, gets a light brand background and brand text (no
   side bar); the current sub-page gets a brand segment on the group's guide line. */
:root { --nav-brand: var(--brand); --nav-active-bg: color-mix(in srgb, var(--nav-brand) 6%, var(--surface)); --nav-active-text: color-mix(in srgb, var(--nav-brand) 86%, black); }
html[data-theme="dark"] { --nav-active-bg: color-mix(in srgb, var(--nav-brand) 14%, var(--surface)); --nav-active-text: color-mix(in srgb, var(--nav-brand) 42%, white); }
.nav-group > a.current,
.nav-sub > summary.has-current { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 600; }
.nav-group > a.current::before { content: none; }
.nav-sub-items { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 8px 10px; border-left: 1px solid var(--line); }
.nav-group .nav-sub-items a { min-height: 34px; padding: 6px 9px 6px 12px; border-radius: 0 4px 4px 0; font-size: 13.5px; }
.nav-group .nav-sub-items a.current { background: transparent; color: var(--ink); font-weight: 600; }
.nav-group .nav-sub-items a.current::before { left: -1px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--nav-brand); }
/* Breathing room between sidebar rows. */
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-group > p { margin-bottom: 6px; }

/* Preview areas on a plain surface (white in the light theme), no dot grid. */
.preview-pane { background: var(--surface); }

/* Language menu in the top bar: the current language's flag and code, the list of languages. */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; width: auto; gap: 6px; padding: 0 9px; display: flex; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu[open] > summary { color: var(--ink); background: var(--surface-hover); }
.icon-button svg.lang-flag, .lang-flag { width: 20px; height: 14px; flex: none; fill: initial; stroke: none; border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / .12); overflow: hidden; }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 168px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 6px); box-shadow: var(--shadow-lg); }
.lang-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; color: var(--text); font-size: 14px; text-decoration: none; }
.lang-list a:hover, .lang-list a:focus-visible { background: var(--surface-hover); color: var(--ink); }
.lang-list a[aria-current="true"] { color: var(--brand-text); font-weight: 600; }

/* Top bar: the language menu takes room on the right, so the side columns are no longer
   forced to the same width; the menu is centred in the space between the logo and the actions. */
.top-cta { white-space: nowrap; }
.top-actions { gap: 8px; }
@media (min-width: 1201px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .topnav { justify-self: center; gap: 28px; }
}
@media (min-width: 1201px) and (max-width: 1400px) {
  .topnav { gap: 20px; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .topnav { gap: 18px; }
}

/* Kılavuzlarda Not / İpucu / Dikkat kutuları: "> **Not:** …" alıntıları (site/build.php). */
.doc-prose blockquote.callout { padding: 12px 16px 12px 15px; border-left-width: 3px; border-radius: 0 5px 5px 0; }
.doc-prose .callout-title { margin: 0 0 4px; font: 600 10.5px/1.4 'DM Mono', monospace; letter-spacing: .07em; text-transform: uppercase; }
.doc-prose .callout-note { border-left-color: var(--blue); background: color-mix(in srgb, var(--blue) 6%, var(--surface)); }
.doc-prose .callout-note .callout-title { color: var(--blue); }
.doc-prose .callout-tip { border-left-color: #16a34a; background: color-mix(in srgb, #16a34a 7%, var(--surface)); }
.doc-prose .callout-tip .callout-title { color: #15803d; }
.doc-prose .callout-warning { border-left-color: #d97706; background: color-mix(in srgb, #d97706 8%, var(--surface)); }
.doc-prose .callout-warning .callout-title { color: #b45309; }
html[data-theme="dark"] .doc-prose .callout-tip .callout-title { color: #4ade80; }
html[data-theme="dark"] .doc-prose .callout-warning .callout-title { color: #fbbf24; }

/* Bütün sayfaları PRO olan alt grubun başlığında da PRO rozeti. */
.nav-sub > summary .nav-pro { flex: none; margin: 0 6px 0 auto; padding: 3px 6px; border-radius: 4px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand-text); font: 600 9.5px/1 'DM Mono', monospace; font-style: normal; letter-spacing: .06em; }

/* Başlıklar daha küçük: sayfa başlıkları (ana sayfa, bileşenler, kılavuzlar, bileşen sayfası) tek boyutta. */
h1 { max-width: 760px; margin: 0 0 12px; font-size: clamp(28px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.035em; }
.lead { font-size: 16px; }
.doc-prose h1 { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.035em; }
.doc-prose h2 { font-size: 20px; }
.component-heading h2 { font-size: 24px; }
.component-detail-content > .component-doc .component-heading h2 { font-size: clamp(28px, 2.6vw, 34px); }
@media (max-width: 680px) {
  h1, .doc-prose h1, .component-detail-content > .component-doc .component-heading h2 { font-size: 26px; }
  .component-heading h2 { font-size: 22px; }
}

/* Büyük harfli etiketler yerine normal yazım: menü grup başlıkları, "Bu sayfada", bileşen üst etiketi,
   not kutusu başlığı, tablo başlıkları ve arama sonuç grupları. */
.nav-group p, .toc > p { color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: 0; text-transform: none; }
.component-kicker { font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
.doc-prose .callout-title { font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: 0; text-transform: none; }
.props-table th { color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: 0; text-transform: none; }
.search-results > p { font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: 0; text-transform: none; }
