@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --color-background: #fff;
  --color-foreground: #000;
  --color-accent: #00c687;
  --color-box-bg: #eee;
  --color-border: rgba(99, 99, 99, 0.2);
  --color-primary: #0073ef;
  --color-secondary: #6d7983;
  --color-disabled: #b7b7b7;
  --color-success: #189259;
  --color-error: #dc3142;
  --color-warning: #f6ba06;
  --color-info: #08c5eb;
  --color-light: #f0f3f7;
  --color-dark: #24272b;
  --card-header: rgba(99, 99, 99, 0.8);
  --color-shadow: rgba(35, 35, 35, 0.1);
}

.dark-mode {
  --color-background: #000;
  --color-foreground: #fff;
  --color-accent: #007550;
  --color-box-bg: #111;
  --color-border: #333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  background-color: var(--color-background);
  color: var(--color-foreground);
}

a {
  text-decoration: none;
  color: var(--color-foreground);
  transition: all 0.2s ease-in-out;
}

a:hover,
a:active {
  opacity: 60%;
}

main {
  padding: 10px 3%;
}

code {
  overflow-wrap: break-word;
}

h1 {
  text-align: center;
}

section {
  padding: 8px 0px;
}

h3,
h4 {
  padding: 4px 0px;
  margin: 0;
}

code {
  border-radius: 8px;
}

hr {
  border-color: var(--color-border);
  margin: 1rem;
}

ul > li {
  padding-top: 2px;
  padding-bottom: 4px;
}

p {
  padding: 6px 0px;
  margin: 0;
}

.navbar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  width: 100%;
  justify-items: center;
  align-items: end;
  justify-content: center;
  gap: 2%;
  background-color: var(--color-accent);
  padding: 12px 5%;
  position: relative;
}

.navbar #home-link {
  position: absolute;
  top: 16px;
  left: 5%;
  font-weight: 600;
  font-size: larger;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.navbar .menu-items {
  display: none;
  flex-direction: column;
  flex: 1;
  width: 100%;
  list-style-type: none;
  align-items: center;
  gap: 16px;
  margin: 0;
}

.navbar #dark-toggle,
#menu-button {
  width: 26px;
  height: 26px;
  border: none;
  cursor: pointer;
  padding: 2px;
  background: none;
  color: var(--color-foreground);
}

.cdn-link {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cdn-link pre {
  flex: 1;
  width: 100%;
}

.list-getting-started {
  list-style: none;
}

.list-getting-started > li {
  padding-top: 8px;
  padding-bottom: 8px;
}

.component-page-link {
  color: var(--color-primary);
  font: medium;
  font-size: large;
}

/* Grid layout */
.component-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  row-gap: 1rem;
  margin: auto;
  margin-top: 24px;
}

.component-box {
  border: 1px solid var(--color-border);
  padding: 1rem;
  border-radius: 8px;
  background: var(--color-box-bg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 360px;
  align-self: flex-start;
  justify-self: center;
}

.preview {
  display: flex;
  justify-content: center;
}

.copy-container {
  display: flex;
  justify-content: end;
}

/* Button styles */
button {
  transition: all 0.2s ease-in-out;
}

button:hover,
button:active {
  opacity: 60%;
}

.btn {
  padding: 6px 12px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 1rem;
  letter-spacing: 1px;
}

.btn:disabled {
  background-color: var(--color-disabled);
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.btn-rounded {
  border-radius: 20px;
  padding: 6px 32px;
}

.btn-animated:hover {
  animation: bounce 0.4s linear;
}

.btn-success {
  background-color: var(--color-success);
  color: white;
}

.btn-error {
  background-color: var(--color-error);
  color: white;
}

.btn-warning {
  background-color: var(--color-warning);
  color: black;
}

.btn-info {
  background-color: var(--color-info);
  color: black;
}

.btn-light {
  background-color: var(--color-light);
  color: black;
}

.btn-dark {
  background-color: var(--color-dark);
  color: white;
}

.btn-link {
  color: var(--color-primary);
  text-underline-offset: 4px;
  background: none;
}

.btn-outline-primary {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: none;
}

.btn-outline-secondary {
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
  background: none;
}

.btn-outline-success {
  border: 2px solid var(--color-success);
  color: var(--color-success);
  background: none;
}

.btn-lg {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 1.2rem;
}

.btn-sm {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Card Components */
.component-title {
  text-align: center;
}

.card {
  border: 2px solid var(--color-border);
  box-shadow: 2px 2px 5px rgba(35, 35, 35, 0.1);
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 8px;
  background-color: var(--color-background);
  color: var(--color-foreground);
  gap: 8px;
  width: 100%;
  max-width: 360px;
}

.card .card-title {
  font-size: larger;
  font-weight: 600;
  letter-spacing: 5%;
}

.card .card-text {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 3%;
}

.card .card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 2px solid var(--color-border);
}

.card-profile {
  align-items: center;
}

.card-profile .card-img-top {
  width: 200px;
  height: 200px;
  border-radius: 100%;
  text-align: center;
}

.card-profile .img-sm {
  width: 120px;
  height: 120px;
}

.card-action-button-container {
  display: flex;
  justify-content: end;
  gap: 10px;
}

.card .card-header {
  margin-top: -16px;
  margin-left: -16px;
  margin-right: -16px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  background-color: var(--card-header);
  padding: 4px 16px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 8px;
}

.card .card-footer {
  margin-bottom: -16px;
  margin-left: -16px;
  margin-right: -16px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  background-color: var(--card-header);
  padding: 4px 16px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  margin-top: 8px;
}

.card-img-selector {
  align-items: center;
  gap: 16px;
}

.card-img-selector .selector-button {
  border: none;
  width: 100%;
  background: none;
}

.card-img-selector .card-placeholder-img {
  width: 200px;
  height: 200px;
  text-align: center;
  object-fit: cover;
  object-position: center;
}

/* Navbars */
.nav-grid {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
  gap: 24px;
}

.nav-component-box {
  border: 1px solid var(--color-border);
  padding: 1rem;
  border-radius: 8px;
  background: var(--color-box-bg);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 16px;
}

/* Base Navbar */
.nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-background);
  color: var(--color-foreground);
  padding: 10px 15px;
  flex-wrap: wrap;
  box-shadow: 2px 2px 5px var(--color-shadow);
}

.nav a {
  text-decoration: none;
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: bold;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
}

.nav-toggler {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-foreground);
}

.nav .nav-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.sticky {
  position: sticky;
  top: 0;
}

.fixed {
  position: fixed;
  top: 0;
}

.nav-center {
  justify-content: center;
}

/* Media Queries */
@media (min-width: 577px) {
  .navbar .menu-items {
    display: flex;
    flex-direction: row;
    justify-content: end;
  }

  .navbar #menu-button {
    display: none;
  }

  .navbar {
    flex-direction: row;
    padding: 12px 4%;
  }
}

@media (min-width: 769px) {
  .navbar {
    padding: 12px 6%;
  }

  .navbar #home-link {
    left: 6%;
  }

  main {
    padding: 12px 6%;
  }
}

@media (min-width: 1201px) {
  .navbar {
    padding: 12px 8%;
  }

  .navbar #home-link {
    left: 8%;
  }

  main {
    padding: 12px 8%;
  }

  .cdn-link {
    flex-direction: row;
  }
}

/* Navbar Mobile */
@media (max-width: 768px) {
  .nav-toggler {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a,
  .dropbtn {
    display: block;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-align: left;
  }
}

/* Navbar Desktop always shows */
@media (min-width: 769px) {
  .nav-links {
    display: flex !important;
  }
}

/* Animations */
@keyframes bounce {
  0% {
    transform: translateY(-1px);
  }
  20% {
    transform: translateY(1px);
  }
  40% {
    transform: translateY(-2px);
  }
  60% {
    transform: translateY(2px);
  }
  80% {
    transform: translateY(1px);
  }
  100% {
    transform: translateY(0px);
  }
}
