/* Tab Styles */
.custom-tabs {
  margin: 1.5rem 0;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
}

.custom-tabs .tabs {
  background: var(--tabs-bg, #f8fafc);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.tabs-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tab-item {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
  color: var(--text-muted, #64748b);
}

.tab-item:hover {
  background: var(--tabs-hover, #f1f5f9);
  color: var(--text-color, #1e293b);
}

.tab-item.is-active {
  color: var(--primary-color, #3b82f6);
  border-bottom-color: var(--primary-color, #3b82f6);
  background: white;
}

.tabs-content {
  padding-top: 0rem;
  padding-right: 1.5rem;
  padding-bottom: 0rem;
  padding-left: 1.5rem;
}

.tab-content {
  display: none;
}

.tab-content.is-active {
  display: block;
}

/* Code Embed Styles */
.code-embed-wrapper {
  margin: 1.5rem 0;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0;
  overflow: hidden;
}

.codeBlockTopper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--code-header-bg, #f8fafc);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.codeBlockTopper .badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin-right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--badge-text, #475569);
  background: var(--badge-bg, #e2e8f0);
  border-radius: 4px;
}

.codeBlockTopperButtons {
  display: flex;
  gap: 0.5rem;
}

.codeBlockTopperButtons .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--btn-text, #475569);
  background: white;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.codeBlockTopperButtons .btn:hover {
  background: var(--btn-hover, #f1f5f9);
  border-color: var(--btn-border-hover, #cbd5e1);
}

.codeBlockTopperButtons .btn.copying {
  background: var(--success-bg, #dcfce7);
  color: var(--success-text, #166534);
  border-color: var(--success-border, #86efac);
}

.code-block-content {
  overflow-x: auto;
  max-height: 800px;
  overflow-y: auto;
}

.code-block-content pre {
  margin: 0;
  padding: 1rem;
}

/* Dark Mode Support - Moved to dark.scss for consistency */

/* Pattern Single Page Styles */

/* Left Sidebar */
.pattern-sidebar-left {
  position: sticky;
  top: 80px;
}

.btn-back-patterns {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: white;
  border: none;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}

.btn-back-patterns:hover {
  background-color: #f8902f;
  color: white !important;
}

/* Table of Contents */
.pattern-toc {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.pattern-toc h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #1e293b;
}

.pattern-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pattern-toc ul li {
  margin: 0.2rem 0;
}

.pattern-toc ul ul {
  margin-top: 0.5rem;
}

.pattern-toc a {
  color: #ff6b35;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.pattern-toc a:hover {
  color: #f7931e;
  text-decoration: underline;
}

/* About Section */
.pattern-about {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
}

.pattern-about h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #1e293b;
}

.about-section {
  margin-bottom: 1.5rem;
}

.about-section:last-child {
  margin-bottom: 0;
}

.about-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 0.5rem 0;
}

.badge-about {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  background: #334155;
  color: white;
}

.badge-about.badge-tool {
  background: #42653d;
  color: white;
}

.badge-about.badge-type {
  background: #547a82;
  color: white;
}

.badge-about.badge-license {
  background: black;
  color: white;
}

/* Main Content Area */
.pattern-main-content {
  max-width: 1000px;
  width: calc(100% - 20px);
  padding-top: 30px;
  padding-left: 40px;
  padding-right: 40px;
  margin-top: 0px;
  margin-right: 20px;
  margin-bottom: 20px;
  word-wrap: break-word;
  background-color: var(--bs-body-bg);
  background-clip: border-box;
  border: var(--bs-border-width) solid var(--bs-border-color-translucent);
  border-radius: var(--bs-border-radius);
}

.pattern-page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.pattern-page-description {
  font-size: 1.125rem;
  color: #64748b;
  margin: 0 0 2rem 0;
  line-height: 1.6;
}

/* Author Card */
.pattern-author-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-right: 1rem;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.author-title {
  font-size: 0.875rem;
  color: #64748b;
}

/* Pattern Content */
.pattern-content {
  max-width: 100%;
  margin: 0;
  font-family: 'Open Sans';
  font-size: 1.1rem;
  line-height: 1.84;
  color: rgba(0, 0, 0, .8);
}

.pattern-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1e293b;
  margin: 2rem 0 1rem 0;
}

.pattern-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 1.5rem 0 0.75rem 0;
}

.pattern-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #334155;
  margin: 1.25rem 0 0.75rem 0;
}

.pattern-content p {
  margin: 0 0 1rem 0;
}

.pattern-content ul,
.pattern-content ol {
  line-height: 1.7;
  color: #475569;
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.pattern-content li {
  margin: 0.5rem 0;
}

.pattern-content a {
  color: #ff6b35;
  text-decoration: none;
}

.pattern-content a:hover {
  text-decoration: underline;
}

.pattern-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.pattern-content code {
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: #e11d48;
}

.pattern-content pre {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  max-height: 800px;
  overflow-y: auto;
  margin: 1rem 0;
}

.pattern-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Responsive */
@media (max-width: 768px) {
  .pattern-sidebar-left {
    position: static;
    margin-bottom: 2rem;
  }

  .pattern-page-title {
    font-size: 2rem;
  }

  .pattern-page-description {
    font-size: 1rem;
  }
}

/* Legacy styles for compatibility */
.pattern-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.pattern-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  color: var(--tag-text, #475569);
  background: var(--tag-bg, #f1f5f9);
  border-radius: 4px;
}

/* Pattern List Page Layout */
.pattern-list-page {
  padding: 2rem 0;
}

.pattern-list-container {
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Sidebar Styles */
.pattern-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.request-pattern-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}

.request-pattern-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.request-pattern-btn i {
  margin-right: 0.5rem;
}

.search-box {
  margin-bottom: 1.5rem;
}

.search-box input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  font-size: 0.95rem;
}

.filter-section {
  background: var(--filter-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 1rem;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.filter-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.reset-btn {
  padding: 0.25rem 0.75rem;
  background: transparent;
  color: var(--primary-color, #3b82f6);
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}

.reset-btn:hover {
  background: var(--hover-bg, #f1f5f9);
}

.filter-category {
  margin-bottom: 1.5rem;
}

.filter-category:last-child {
  margin-bottom: 0;
}

.filter-category-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #1e293b);
  margin: 0 0 0.75rem 0;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.875rem;
}

.filter-checkbox {
  margin-right: 0.5rem;
}

.filter-label {
  color: var(--text-muted, #64748b);
  transition: color 0.2s;
}

.filter-option:hover .filter-label {
  color: var(--text-color, #1e293b);
}

/* Main Content Area */
.pattern-content-area {
  flex: 1;
  min-width: 0;
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted, #64748b);
}

/* Pattern Card Styles */
.pattern-card {
  background: white;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s;
}

.pattern-card:hover {
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.pattern-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.pattern-title a {
  color: var(--text-color, #1e293b);
  text-decoration: none;
}

.pattern-title a:hover {
  color: var(--primary-color, #3b82f6);
}

.pattern-description {
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.pattern-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 12px;
  white-space: nowrap;
}

/* Badge color schemes */
.badge-tool {
  background: #dbeafe;
  color: #1e40af;
}

.badge-compute {
  background: #fce7f3;
  color: #9f1239;
}

.badge-app {
  background: #e0e7ff;
  color: #4338ca;
}

.badge-language {
  background: #fef3c7;
  color: #92400e;
}

.badge-type {
  background: #d1fae5;
  color: #065f46;
}

.badge-feature {
  background: #f3e8ff;
  color: #6b21a8;
}

.pattern-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.pattern-author {
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .pattern-list-container {
    flex-direction: column;
  }

  .pattern-sidebar {
    width: 100%;
  }

  .filter-section {
    max-height: 400px;
    overflow-y: auto;
  }
}

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

/* Pagination Styles */
.pagination-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.pagination-info {
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
  font-weight: 500;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  color: var(--text-color, #1e293b);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--hover-bg, #f1f5f9);
  border-color: var(--primary-color, coral);
  color: var(--primary-color, coral);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--disabled-bg, #f8fafc);
}

.pagination-btn i {
  font-size: 0.75rem;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-page-btn {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  background: white;
  color: var(--text-color, #1e293b);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-page-btn:hover {
  background: var(--hover-bg, #f1f5f9);
  border-color: var(--primary-color, coral);
  color: var(--primary-color, coral);
}

.pagination-page-btn.active {
  background: var(--primary-color, coral);
  color: white;
  border-color: var(--primary-color, coral);
}

.pagination-ellipsis {
  padding: 0.5rem;
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
}

/* Responsive Pagination */
@media (max-width: 640px) {
  .pagination-nav {
    width: 100%;
  }

  .pagination-btn {
    flex: 0 0 auto;
  }

  .pagination-pages {
    flex: 1;
    justify-content: center;
    overflow-x: auto;
  }

  .pagination-page-btn {
    min-width: 2.25rem;
    height: 2.25rem;
    font-size: 0.8125rem;
  }
}

/* Dark Mode for Pattern List - Moved to dark.scss */
