/* on content layouts we want the background to be surface instead of canvas */
body {
  background-color: var(--ory-theme-background-surface);
}

/* Welcome page sidebar - all text should be black */
.main-nav,
.main-nav * {
  color: #000000 !important;
}

/* Sidebar links */
.main-nav a,
.main-nav a span,
.main-nav [class*="nav"] {
  color: #000000 !important;
}

/* Sidebar section titles */
.main-nav [class*="title"],
.main-nav [class*="heading"],
.main-nav h1,
.main-nav h2,
.main-nav h3,
.main-nav h4,
.main-nav h5,
.main-nav h6 {
  color: #000000 !important;
}

/* Sidebar icons - also make them black */
.main-nav svg,
.main-nav [class*="icon"] {
  color: #000000 !important;
  fill: #000000 !important;
}

/* Disabled navigation items - faded appearance */
.main-nav a[disabled],
.main-nav [aria-disabled="true"],
.main-nav [class*="disabled"],
.main-nav a[disabled] *,
.main-nav [aria-disabled="true"] *,
.main-nav [class*="disabled"] * {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  color: #000000 !important;
}

.main-nav a[disabled] svg,
.main-nav [aria-disabled="true"] svg,
.main-nav [class*="disabled"] svg {
  opacity: 0.3 !important;
  fill: #000000 !important;
  stroke: #000000 !important;
}

/* Replace sidebar title with Sarvam logo */
/* Hide the text title */
.main-nav > a:first-child,
.main-nav > div:first-child > a,
.main-nav [class*="navTitle"],
.main-nav [class*="nav-title"],
.main-nav [class*="NavTitle"],
.main-nav [class*="title"]:first-child,
.main-nav > span:first-child,
.main-nav > div:first-child {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
}

/* Add the logo as a pseudo-element or via a new element */
.main-nav::before {
  content: "" !important;
  display: block !important;
  width: 160px !important;
  height: 40px !important;
  background-image: url("sarvam-text-logo.png") !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: contain !important;
  margin-bottom: 1.5rem !important;
  margin-left: 1rem !important;
}

/* Hide the original nav title text completely */
.main-nav > *:first-child:not(ul):not(nav):not(section) {
  display: none !important;
}

/* only manage the content next to the nav */
.container {
  display: flex;
  flex-direction: column;
  /* on mobile we have a padding top of 2rem */
  padding: 2rem 2rem;
  /* on mobile we dont want the content hidden under the nav */
  margin-top: 5.125rem;
  height: auto;
}

/* manage nav and content */
.app-container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  min-width: 100%;
  /* we need this padding since the footer will hide content at the bottom of the container */
  padding-bottom: 5.5rem;
}

.wrap-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

body:before {
  display: none;
  visibility: hidden;
}

.traits-box {
  display: flex;
  flex: 1 1 auto;
  padding: 0.5rem;
  max-width: calc(50% - 2rem);
}

.traits-box-divider {
  border-top: 1px solid var(--ory-theme-border-def);
}

.session-code-box > pre {
  white-space: pre-wrap; /* Since CSS 2.1 */
  white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
  white-space: -pre-wrap; /* Opera 4-6 */
  white-space: -o-pre-wrap; /* Opera 7 */
  word-wrap: break-word; /* Internet Explorer 5.5+ */
}

.session-code-box {
  display: flex;
  flex: 1 1 auto;
  max-width: calc(50% - 2rem);
  margin-bottom: auto;
}

.content {
  width: auto;
}

/* ==========================================
   Resource Cards Section
   ========================================== */
.resource-cards-section {
  margin-top: 3rem;
}

@media screen and (min-width: 768px) {
  .resource-cards-section {
    margin-top: 4rem;
  }
}

.resource-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media screen and (min-width: 640px) {
  .resource-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media screen and (min-width: 1024px) {
  .resource-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.resource-card {
  background-color: #ffffff;
  border: 1px solid #ededed;
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.resource-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.resource-card-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-card-icon svg {
  width: 3rem;
  height: 3rem;
  stroke: #323232;
}

.resource-card:hover .resource-card-icon svg {
  stroke: #000000;
}

.resource-card-title {
  font-size: 1.125rem;
  font-weight: 580;
  color: #323232;
  margin-bottom: 0.5rem;
  font-family: "SeasonMix", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  display: block !important;
}

.resource-card:hover .resource-card-title {
  color: #000000;
}

.resource-card-description {
  font-size: 0.875rem;
  font-weight: 430;
  color: #a5a5a5;
  font-family: "Matter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  margin: 0;
}

.resource-card:hover .resource-card-description {
  color: #858585;
}

/* wide-screen vieport */
@media screen and (min-width: 90em) {
  .content {
    display: flex;
    width: 100%;
    flex: 1 1 auto;
    gap: 2rem;
    max-width: 90em;
  }
  body:before {
    content: "large";
  }
}

/* laptop viewport */
@media screen and (min-width: 48em) {
  /* only on desktop we don't want the content to be under the nav */
  .container {
    /* remove mobile top margin */
    margin-top: 0;
    margin-left: 18.75rem;
    padding-top: 4rem;
  }
  /* only on desktop we have nav the full height of the viewport */
  .main-nav {
    padding-top: 4rem;
    min-height: 100vh;
  }
  body:before {
    content: "medium";
  }
}

/* when we are on mobile/tablet we want the content to be under the nav */
@media screen and (min-width: 0) and (max-width: 48em) {
  .app-container {
    flex-direction: column;
  }
  .container {
    margin-left: 0;
  }
  body:before {
    content: "small";
  }
  .session-code-box,
  .traits-box {
    max-width: 100%;
    width: 100%;
  }
}
