/* SEC Master Design System v3.0 - Custom Styles */

* {
  font-family: 'Poppins', sans-serif;
}

/* Custom Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

.btn-primary {
  background-color: #0369a1;
  color: white;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.btn-primary:hover {
  background-color: #075985;
}

.btn-primary:active {
  background-color: #0c4a6e;
}

.btn-outline {
  border: 1px solid #0369a1;
  color: #0369a1;
  background-color: white;
}

.btn-outline:hover {
  background-color: #f0f9ff;
}

.btn-outline:active {
  background-color: #e0f2fe;
}

.btn-ghost {
  color: #404040;
  background-color: transparent;
}

.btn-ghost:hover {
  background-color: #f5f5f5;
}

.btn-ghost:active {
  background-color: #e5e5e5;
}

.btn-link {
  color: #0369a1;
  background-color: transparent;
  box-shadow: none;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-danger:active {
  background-color: #b91c1c;
}

.btn-danger-outline {
  border: 1px solid #ef4444;
  color: #ef4444;
  background-color: white;
}

.btn-danger-outline:hover {
  background-color: #fef2f2;
}

.btn-danger-ghost {
  color: #dc2626;
  background-color: transparent;
}

.btn-danger-ghost:hover {
  background-color: #fef2f2;
}

.btn-danger-link {
  color: #ef4444;
  background-color: transparent;
  box-shadow: none;
}

.btn-danger-link:hover {
  text-decoration: underline;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

/* Input Styles */
.input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #d4d4d4;
  background-color: white;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.input:focus {
  outline: none;
  border-color: #0369a1;
  box-shadow: 0 0 0 1px #0369a1;
}

/* Section Styles */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(3, 105, 161, 0.2);
}

@media (min-width: 640px) {
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

.sub-title {
  font-size: 1rem;
  font-weight: 600;
  color: #171717;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .sub-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
}

.component-wrapper {
  background-color: white;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

@media (min-width: 640px) {
  .component-wrapper {
    padding: 1.5rem;
  }
}

.preview-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Sidebar Active Link */
.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #525252;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.nav-link:hover {
  background-color: #f5f5f5;
  color: #0369a1;
}

.nav-link.active {
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 500;
}

/* Code Block Styles */
pre {
  background-color: #171717;
  color: #f5f5f5;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.75rem;
  line-height: 1.6;
}

code {
  font-family: 'Courier New', monospace;
}

/* Animation for spin */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Sticky sidebar */
.sticky-sidebar {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

/* Inline icon support */
.nav-link svg {
  display: inline-block;
  vertical-align: middle;
}

/* Prose styles for How to Use section */
.prose {
  color: #404040;
}

.prose code {
  background-color: #f5f5f5;
  color: #0369a1;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

/* Mobile Menu */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sticky-sidebar {
    position: relative;
    max-height: none;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  pre code {
    font-size: 0.65rem;
  }

  table {
    font-size: 0.75rem;
  }
}

/* Hide scrollbar for sidebar */
.sticky-sidebar::-webkit-scrollbar {
  width: 4px;
}

.sticky-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sticky-sidebar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}

.sticky-sidebar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
