/* ==========================================================================
   WP Payment Pal — Documentation Styles
   Inspired by wpsimplepay.com/docs design
   ========================================================================== */

/* ---------- Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ---------- Reset ---------- */
.wppal-docs-page *,
.wppal-docs-page *::before,
.wppal-docs-page *::after { box-sizing: border-box; }1

/* ---------- Base ---------- */
.wppal-docs-page {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1f2937;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wppal-docs-page a {
  color: #428bca;
  text-decoration: none;
}

.wppal-docs-page a:hover {
  text-decoration: underline;
}

/* ---------- Header ---------- */
.wppal-docs-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.wppal-docs-header__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 16px max(1.25rem, 3vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wppal-docs-header__title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wppal-docs-header__title:hover {
  color: #428bca;
  text-decoration: none;
}

.wppal-docs-header__brand {
  color: #428bca;
  font-weight: 700;
}

.wppal-docs-header__home-link {
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  font-weight: 400;
}

.wppal-docs-header__home-link:hover {
  color: #428bca;
  text-decoration: none;
}

.wppal-docs-header__toggle {
  display: none;
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  font-family: inherit;
}

.wppal-docs-header__toggle:hover {
  background: #f9fafb;
}

@media (max-width: 781px) {
  .wppal-docs-header__toggle { display: block; }
}

/* ---------- Breadcrumb ---------- */
.wppal-docs-breadcrumb {
  padding: 16px max(1.25rem, 3vw);
  max-width: 80rem;
  margin: 0 auto;
  font-size: 14px;
  color: #6b7280;
}

.wppal-docs-breadcrumb a {
  color: #428bca;
  text-decoration: none;
}

.wppal-docs-breadcrumb a:hover {
  text-decoration: underline;
}

.wppal-docs-breadcrumb__separator {
  margin: 0 8px;
  color: #9ca3af;
}

.wppal-docs-breadcrumb__current {
  color: #1f2937;
  font-weight: 500;
}

/* ---------- Layout ---------- */
.wppal-docs-layout {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 max(1.25rem, 3vw) 64px;
  display: flex;
  gap: 48px;
}

@media (max-width: 781px) {
  .wppal-docs-layout {
    flex-direction: column;
    gap: 0;
    padding: 0 1.25rem 40px;
  }
}

/* ---------- Sidebar ---------- */
.wppal-docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 73px;
  align-self: flex-start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 16px;
}

.wppal-docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.wppal-docs-sidebar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

@media (max-width: 781px) {
  .wppal-docs-sidebar {
    display: none;
    width: 100%;
    position: static;
    max-height: none;
    padding-right: 0;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
  }
  .wppal-docs-sidebar--open { display: block; }
}

.wppal-docs-sidebar__category {
  margin-bottom: 28px;
}

.wppal-docs-sidebar__category-title {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
  padding: 0 12px;
}

.wppal-docs-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wppal-docs-sidebar__link {
  display: block;
  padding: 5px 12px;
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  border-radius: 6px;
  transition: background 150ms ease, color 150ms ease;
  line-height: 1.4;
}

.wppal-docs-sidebar__link:hover {
  background: #f3f4f6;
  color: #1f2937;
  text-decoration: none;
}

.wppal-docs-sidebar__link--active {
  background: #eef5fc;
  color: #428bca;
  font-weight: 500;
}

/* ---------- Content ---------- */
.wppal-docs-content {
  flex: 1;
  min-width: 0;
  max-width: 780px;
}

/* ---------- Article ---------- */
.wppal-docs-article__title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 12px;
  line-height: 1.2;
}

.wppal-docs-article__excerpt {
  font-size: 1.1rem;
  color: #6b7280;
  margin: 0 0 32px;
  line-height: 1.6;
}

.wppal-docs-article__meta {
  font-size: 13px;
  color: #9ca3af;
  margin: 32px 0 0;
}

/* ---------- Article Body ---------- */
.wppal-docs-article__body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
}

.wppal-docs-article__body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: #1f2937;
}

.wppal-docs-article__body h4 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 24px 0 8px;
  color: #1f2937;
}

.wppal-docs-article__body p {
  margin: 0 0 1.5rem;
  line-height: 1.6;
  color: #6b7280;
}

.wppal-docs-article__body a {
  color: #428bca;
  text-decoration: underline;
}

.wppal-docs-article__body a:hover {
  text-decoration: none;
}

.wppal-docs-article__body ul,
.wppal-docs-article__body ol {
  margin: 0 0 1.5rem;
  padding-left: 24px;
  color: #6b7280;
}

.wppal-docs-article__body li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.wppal-docs-article__body code {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.875em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.wppal-docs-article__body pre {
  background: #1f2937;
  color: #e5e7eb;
  border-radius: 10px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 0 0 1.5rem;
  box-shadow: 0 1px 3px rgba(66, 139, 202, 0.05);
}

.wppal-docs-article__body pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 14px;
}

.wppal-docs-article__body blockquote {
  border-left: 3px solid #428bca;
  margin: 0 0 1.5rem;
  padding: 16px 24px;
  background: #f9fafb;
  border-radius: 0 10px 10px 0;
}

.wppal-docs-article__body blockquote p {
  margin: 0;
  color: #6b7280;
}

.wppal-docs-article__body figure {
  margin: 1.5rem 0;
  text-align: center;
}

.wppal-docs-article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(66, 139, 202, 0.10);
}

.wppal-docs-article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 14px;
}

.wppal-docs-article__body table th,
.wppal-docs-article__body table td {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.wppal-docs-article__body table th {
  background: #f9fafb;
  font-weight: 600;
  color: #1f2937;
}

.wppal-docs-article__body table tr:nth-child(even) td {
  background: #f9fafb;
}

.wppal-docs-article__body hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 32px 0;
}

/* ---------- Table of Contents ---------- */
.wppal-docs-toc {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 0 0 32px;
}

.wppal-docs-toc__title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wppal-docs-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wppal-docs-toc__list li {
  margin-bottom: 6px;
}

.wppal-docs-toc__list a {
  font-size: 14px;
  color: #428bca;
  text-decoration: none;
}

.wppal-docs-toc__list a:hover {
  text-decoration: underline;
}

/* ---------- Pagination ---------- */
.wppal-docs-pagination {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
}

@media (max-width: 781px) {
  .wppal-docs-pagination { flex-direction: column; }
}

.wppal-docs-pagination__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: #1f2937;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.wppal-docs-pagination__link:hover {
  border-color: #428bca;
  box-shadow: 0 3px 6px rgba(66, 139, 202, 0.05);
  text-decoration: none;
}

.wppal-docs-pagination__link--next {
  text-align: right;
}

.wppal-docs-pagination__label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  font-weight: 500;
}

.wppal-docs-pagination__title {
  font-size: 15px;
  font-weight: 500;
  color: #428bca;
}

/* ==========================================================================
   Archive / Index Page
   ========================================================================== */

/* ---------- Hero ---------- */
.wppal-docs-index__hero {
  text-align: center;
  padding: 56px 24px 40px;
  background: #ffffff;
}

.wppal-docs-index__hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: #1f2937;
}

.wppal-docs-index__hero-subtitle {
  font-size: 1.15rem;
  color: #6b7280;
  margin: 0 0 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Search ---------- */
.wppal-docs-search {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.wppal-docs-search__input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  color: #1f2937;
  background: #fff;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 1px 3px rgba(66, 139, 202, 0.05);
}

.wppal-docs-search__input::placeholder {
  color: #9ca3af;
}

.wppal-docs-search__input:focus {
  border-color: #428bca;
  box-shadow: 0 0 0 3px rgba(66, 139, 202, 0.12);
}

.wppal-docs-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #9ca3af;
  pointer-events: none;
}

.wppal-docs-search__results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-top: 8px;
  box-shadow: 0 4px 8px rgba(66, 139, 202, 0.10);
  z-index: 50;
  max-height: 360px;
  overflow-y: auto;
  display: none;
}

.wppal-docs-search__results--open {
  display: block;
}

.wppal-docs-search__result-item {
  display: block;
  padding: 12px 20px;
  color: #1f2937;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 100ms ease;
}

.wppal-docs-search__result-item:last-child {
  border-bottom: none;
}

.wppal-docs-search__result-item:hover {
  background: #f9fafb;
  text-decoration: none;
}

.wppal-docs-search__result-category {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-top: 2px;
}

.wppal-docs-search__no-results {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

/* ---------- Category Grid ---------- */
.wppal-docs-index__grid {
  max-width: 80rem;
  margin: 40px auto 0;
  padding: 0 max(1.25rem, 3vw);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .wppal-docs-index__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .wppal-docs-index__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Category Cards ---------- */
.wppal-docs-index__card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 28px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.wppal-docs-index__card:hover {
  border-color: #428bca;
  box-shadow: 0 4px 8px rgba(66, 139, 202, 0.10);
}

.wppal-docs-index__card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: #1f2937;
}

.wppal-docs-index__card-desc {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 16px;
  line-height: 1.5;
  flex: 1;
}

.wppal-docs-index__card-count {
  font-size: 13px;
  color: #9ca3af;
  margin: 0 0 16px;
}

.wppal-docs-index__card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wppal-docs-index__card-link {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: #428bca;
  text-decoration: none;
}

.wppal-docs-index__card-link:hover {
  text-decoration: underline;
}

.wppal-docs-index__card-viewall {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #428bca;
  text-decoration: none;
}

.wppal-docs-index__card-viewall:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Category Archive Page
   ========================================================================== */

.wppal-docs-category__header {
  max-width: 80rem;
  margin: 0 auto;
  padding: 40px max(1.25rem, 3vw) 0;
}

.wppal-docs-category__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px;
}

.wppal-docs-category__count {
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 32px;
}

.wppal-docs-category__layout {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 max(1.25rem, 3vw) 64px;
  display: flex;
  gap: 48px;
}

@media (max-width: 781px) {
  .wppal-docs-category__layout {
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
  }
}

.wppal-docs-category__content {
  flex: 1;
  min-width: 0;
}

.wppal-docs-category__sidebar {
  width: 260px;
  flex-shrink: 0;
}

@media (max-width: 781px) {
  .wppal-docs-category__sidebar {
    width: 100%;
    order: -1;
  }
}

/* ---------- Article List ---------- */
.wppal-docs-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wppal-docs-article-list__item {
  padding: 20px 0;
  border-bottom: 1px solid #f3f4f6;
}

.wppal-docs-article-list__item:first-child {
  padding-top: 0;
}

.wppal-docs-article-list__link {
  font-size: 1.05rem;
  font-weight: 500;
  color: #428bca;
  text-decoration: none;
}

.wppal-docs-article-list__link:hover {
  text-decoration: underline;
}

.wppal-docs-article-list__desc {
  font-size: 14px;
  color: #6b7280;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* ---------- Sidebar Categories ---------- */
.wppal-docs-categories-nav__title {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}

.wppal-docs-categories-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wppal-docs-categories-nav__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  border-radius: 6px;
  transition: background 150ms ease, color 150ms ease;
}

.wppal-docs-categories-nav__link:hover {
  background: #f3f4f6;
  color: #1f2937;
  text-decoration: none;
}

.wppal-docs-categories-nav__link--active {
  background: #eef5fc;
  color: #428bca;
  font-weight: 500;
}

.wppal-docs-categories-nav__count {
  font-size: 12px;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.wppal-docs-categories-nav__link--active .wppal-docs-categories-nav__count {
  background: #dbeafe;
  color: #428bca;
}

/* ---------- Footer ---------- */
.wppal-docs-footer {
  border-top: 1px solid #e5e7eb;
  padding: 32px max(1.25rem, 3vw);
  text-align: center;
  margin-top: 0;
  background: #f9fafb;
}

.wppal-docs-footer__text {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.wppal-docs-footer__text a {
  color: #428bca;
  text-decoration: none;
}

.wppal-docs-footer__text a:hover {
  text-decoration: underline;
}
