/* Page root. */
#ps-gallery-main-container {
  font-size: 13px;
  font-family: work-sans-regular, Arial, sans-serif;
}

.ps-gallery-directory {
  background: #EDF1F7;
}

/* Intro banner — dark gradient hero with the highlight strip. */
.psd.ps-gallery-intro {
  background: linear-gradient(150deg, #4b2f4a 0%, #143a56 55%, #222e36 100%);
  color: #f6f6f6;
  padding-bottom: 40px;
}

.psd.ps-gallery-intro .ps-gallery-container {
  padding: 140px 15px 34px;
}

.psd .ps-gallery-title {
    margin: auto;
    max-width: 790px;
    color: #c2cdf8;
}

.psd .ps-gallery-desc-wrap {
  padding-left: 0;
  padding-block: 35px;
  max-width: 800px;
  margin: 0 auto;
}

.psd .ps-gallery-highlight-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.psd .ps-gallery-highlight-wrapper > div {
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(255, 255, 255, 0.26);
  margin-right: 15px;
  padding-right: 15px;
  margin-bottom: 10px;
}

.psd .ps-gallery-highlight-wrapper > div:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.psd .ps-gallery-highlight-wrapper i {
  font-size: 1.2em;
  margin-right: 6px;
  color: #5FE0C8;
}

/* Steps card — download/run/done, pulled up over the banner. */
.ps-gallery-directory .psd-steps {
  max-width: 800px;
  margin: -92px auto 20px;
  text-align: center;
  padding: 16px 20px;
  background: #ffffff;
  border-radius: 20px;
  color: #383838;
  box-shadow: 0 2px 4px #00000029;
}

.ps-gallery-directory .run-steps {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 35px;
  flex-wrap: nowrap;
}

.ps-gallery-directory .run-step {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  padding: 4px 12px;
}

.ps-gallery-directory .run-ic {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  font-size: 1.45em;
  color: #45576E;
}

.ps-gallery-directory .run-ic.b {
  color: #2563B0;
}

.ps-gallery-directory .run-ic.g {
  color: #0CBC78;
}

.ps-gallery-directory .run-tx {
  text-align: left;
  line-height: 1.15;
}

.ps-gallery-directory .run-tx p {
  display: block;
  font-family: poppins-semibold, Arial, sans-serif;
  font-size: 1.08em;
  margin-bottom: 2px;
}

.ps-gallery-directory .run-tx span {
  font-size: .88em;
  color: #64778F;
}

.ps-gallery-directory .run-arrow {
  flex: 0 0 auto;
  margin: 0 4px;
  font-size: 1.2em;
  color: #2f4c74;
}

.ps-gallery-directory .run-note {
  margin: 14px 0 0;
  font-size: 1em;
  color: #64778F;
}

.ps-gallery-directory .run-note span {
  font-family: 'work-sans-medium';
  font-size: .95em;
  background: #ffffff;
  border: 1px solid #E6ECF3;
  border-radius: 6px;
  padding: 4px 9px;
  color: #CC20A3;
}

/* Script wall — the shared _CategoryCardLayout partial. */
.ps-gallery-cards-wrap {
  margin-top: 60px;
}

#psGallery .category-card-actions > a:last-child {
  margin-left: auto;
}

/* Must-have script packages. */
.ps-gallery-package {
  background-color: #13223f;
  padding-top: 20px;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: #efefef;
  background-image: var(--img-powershell-script-images-powershell-script-bg-svg);
}

.ps-gallery-package-title-wrap {
  -webkit-text-fill-color: transparent;
  background: linear-gradient(to right, #ff45ff, #e5c445) text;
}

.ps-gallery-package-card-wrapper {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.ps-gallery-package-card {
  max-width: 420px;
  border-radius: 6px;
  text-align: left;
  background-color: #3140543d;
  border: 1px solid #c4dcf41f;
  box-shadow: -1px 4px 10px rgb(0 0 0 / 15%);
  backdrop-filter: blur(7px);
  padding: 12px 18px 18px;
}

.ps-gallery-package-card .ps-gallery-pkg-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2em;
  letter-spacing: 0.25px;
  font-family: poppins-medium, Arial, Helvetica, sans-serif;
  color: #7fdfff;
}

.ps-gallery-package-card .ps-gallery-pkg-card-header .ps-gallery-pkg-icon-wrapper {
  font-size: 1.2em;
}

.ps-gallery-package-card .ps-gallery-pkg-card-content {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
}

.ps-gallery-package-card .ps-gallery-pkg-card-content .ps-gallery-pkg-card-desc {
  color: #cddce7;
}

.ps-gallery-package-card .ps-gallery-pkg-card-content .ps-gallery-pkg-card-button {
  margin-top: 10px;
  color: #f9f1a5;
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  cursor: pointer;
}

.ps-gallery-package-card .ps-gallery-pkg-card-content .ps-gallery-pkg-card-button a {
  position: relative;
}

.ps-gallery-package-card .ps-gallery-pkg-card-content .ps-gallery-pkg-card-button a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.ps-gallery-package-card .ps-gallery-pkg-card-content .ps-gallery-pkg-card-button:hover a::after {
  transform: scaleX(1);
}

.ps-gallery-expand-arrow {
  transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
}

.ps-gallery-pkg-card-button:hover .ps-gallery-expand-arrow {
  transform: translateX(6px);
}

.ps-gallery-expand-arrow .stem {
  stroke-dasharray: 8.25;
  stroke-dashoffset: 8.25;
  transition: stroke-dashoffset 0.3s ease;
}

.ps-gallery-pkg-card-button:hover .stem {
  stroke-dashoffset: 0;
}

/* Why admins love our scripts. */
.ps-gallery-why {
  background-color: #fdfdfd;
  position: relative;
}

.ps-gallery-why-container {
  overflow: hidden;
}

.ps-gallery-why-desc-wrap {
  background: linear-gradient(to right, transparent, #86d1a729, transparent);
  padding: 15px;
  position: relative;
  display: inline-block;
  max-width: 1000px;
  font-style: italic;
  color: #017a4b;
  margin: 10px 0px 20px 20px;
  font-size: 1.2em;
  margin-bottom: 8px;
  letter-spacing: 0.25px;
  font-family: poppins-medium, Arial, Helvetica, sans-serif;
}

.ps-gallery-why-desc-wrap:before {
  content: "\f10d";
  font-family: 'FontAwesome';
  position: absolute;
  left: -18px;
  top: -4px;
  font-size: 2em;
}

.ps-gallery-why-desc-wrap p {
  font-size: 1.15em;
  line-height: 1.4em;
  position: relative;
}

.ps-gallery-why-card-wrapper {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.ps-gallery-why-card {
  max-width: 550px;
  padding: 20px;
  text-align: left;
  background-color: #ffffff;
  box-shadow: 0 4px 10px rgb(62 62 62 / 40%);
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.ps-gallery-why-card .why-card-icon-wrapper {
  font-size: 2.4em;
  background: linear-gradient(315deg, #2e8b89 0%, #1a95ae 74%);
  border-radius: 20px;
  width: 60px;
  height: 60px;
  padding: 13px;
  color: white;
}

.ps-gallery-why-card .why-card-title {
  color: #207b84;
}

.ps-gallery-why-card.why-card-color1 .why-card-icon-wrapper {
  background: linear-gradient(315deg, #db9354 0%, #c76674 74%);
}

.ps-gallery-why-card.why-card-color1 .why-card-title {
  color: #b25a60;
}

.ps-gallery-why-card.why-card-color2 .why-card-icon-wrapper {
  background: linear-gradient(135deg, #b7539b 0%, #846db9 74%);
}

.ps-gallery-why-card.why-card-color2 .why-card-title {
  color: #8055a8;
}

/* FAQ accordion. */
.ps-gallery-faq {
  background: linear-gradient(180deg, #13223f 0%, #101a2e 100%);
  color: #eef2f8;
}

.ps-gallery-faq-title-wrap {
  color: #7fdfff;
  font-family: 'poppins-light';
}

.ps-gallery-faq-accordion-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}

.ps-gallery-faq-item {
  background: #ffffff0a;
  border: 1px solid #c4dcf41f;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.ps-gallery-faq-item:hover {
  background: #ffffff14;
}

.ps-gallery-faq-item.active {
  background: #ffffff12;
  border-color: #7fdfff45;
}

.ps-gallery-faq-question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
}

.ps-gallery-faq-question {
  font-family: poppins-medium, Arial, Helvetica, sans-serif;
  font-size: 1.15em;
  line-height: 1.45;
  letter-spacing: 0.3px;
  color: #ffffff;
  transition: color 0.3s ease;
}

.ps-gallery-faq-item.active .ps-gallery-faq-question {
  color: #a6e9ff;
}

.ps-gallery-faq-question-row i {
  flex: 0 0 auto;
  font-size: 1.2em;
  color: #9fb6d0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

.ps-gallery-faq-item.active .ps-gallery-faq-question-row i {
  transform: rotate(180deg);
  color: #7fdfff;
}

.ps-gallery-faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-gallery-faq-item.active .ps-gallery-faq-answer {
  padding: 0 18px 16px;
  opacity: 1;
}

.ps-gallery-faq-answer p {
  padding: 0;
  color: #cddce7;
  font-size: 1.08em;
  line-height: 1.65;
  letter-spacing: 0.3px;
}

.ps-gallery-faq-answer a {
  color: #50d5ff;
  text-decoration: underline currentcolor;
}

/* GitHub CTA. */
.ps-gallery-cta {
  background: #ffffff;
}

.ps-gallery-cta .ps-gallery-cta-container {
  padding-bottom: 80px;
}

.ps-gallery-cta-card {
  position: relative;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 20px;
  background: linear-gradient(to bottom, #1c2758, #112939);
  box-shadow: 0 20px 50px rgba(8, 20, 15, .4);
  display: flex;
  align-items: center;
  gap: 40px;
}

.ps-gallery-cta-text {
  position: relative;
  z-index: 1;
  flex: 1 1 58%;
  text-align: left;
}

.ps-gallery-cta-image {
  position: relative;
  z-index: 1;
  flex: 0 1 30%;
  max-width: 480px;
  container-type: inline-size;
}

.ps-gallery-cta-image img {
  width: 100%;
  height: auto;
  display: block;
}

.ps-gallery-stars-badge {
    position: absolute;
    top: 35%;
    left: 65.5%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: 'work-sans-medium';
    padding: 4px 5px;
    border-radius: 4px;
    background: linear-gradient(141deg, #9646fa 0%, #4a43d5 100%);
    box-shadow: 0px 0px 10px rgb(255 255 255 / 48%);
    font-size: clamp(8px, 3.6cqw, 11px);
    color: #ffffff;
    white-space: nowrap;
}

.ps-gallery-stars-badge .stars-gh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: #ffffff;
  color: #1b1f23;
  font-size: 1em;
}

.ps-gallery-stars-badge .stars-text {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.ps-gallery-stars-badge .stars-text .fa-star {
  color: #ff8a00;
}

.cta-title {
  color: #a6ffeb;
}

.cta-desc {
  color: #ededed;
  padding: 0;
}

.cta-desc span {
  color: #91ff90;
}

.ps-gallery-cta-btn {
    background: linear-gradient(151deg, #9737bd 0%, #225989 100%);
    padding: 10px 12px;
    border-radius: 12px;
    margin: 0px;
    white-space: normal;
    line-height: 1.6em;
}

/* Lifted from its global 50px so it clears the Discord bubble below it. */
#scroll-top {
  bottom: 100px;
}

/* Floating Discord bubble — the icon is always there; the panel opens on click or deep scroll. */
.floating-discord-cta {
  position: fixed;
  right: 15px;
  bottom: 35px;
  z-index: 13;
}

.floating-discord-cta * {
  box-sizing: border-box;
}

.discord-cta-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #19adc4, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6em;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 1px rgba(255, 255, 255, .2);
  transition: transform .3s ease, box-shadow .3s ease;
}

.discord-cta-icon:hover {
  transform: scale(1.08);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .25);
}

.floating-discord-content {
  position: absolute;
  right: -6px;
  bottom: 65px;
  width: 290px;
  padding: 20px;
  border-radius: 10px;
  color: #fff;
  backdrop-filter: blur(18px) saturate(160%);
  border: 2px solid transparent;
  background: linear-gradient(rgb(18 13 54), rgb(13 30 83)) padding-box, linear-gradient(135deg, #3dadff, #1cddcd) border-box;
  opacity: 0;
  transform: scale(0.3) translateY(25px);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .35s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1);
}

.floating-discord-content::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 22px;
  width: 18px;
  height: 18px;
  background: rgb(12 27 76);
  transform: rotate(45deg);
  border-right: 2px solid #1cddcd;
  border-bottom: 2px solid #1cddcd;
  box-shadow: 3px 3px 15px rgba(0, 0, 0, .35);
}

.floating-discord-cta.active .floating-discord-content {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.discord-cta-title {
  font-family: poppins-light, Arial, Helvetica, sans-serif;
  font-size: 1.1em;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.discord-cta-desc {
  font-size: 0.95em;
  line-height: 1.6em;
  color: #bccddc;
}

.floating-discord-btn {
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #19adc4, #6366f1);
  color: white;
  text-align: center;
  transition: all .25s ease;
  max-width: 130px;
  cursor: pointer;
}

.floating-discord-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}

.discord-cta-close {
  position: absolute;
  top: 0px;
  right: -1px;
  font-size: 1.2em;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
  padding: 4px 6px;
  background: #26cedc;
  color: #001e47;
  border-top-right-radius: 6px;
  border-bottom-left-radius: 12px;
}

.discord-cta-close span {
  transform: translateY(-2px);
  display: block;
}

.discord-cta-close:hover {
  opacity: .8;
}

/* ---- Responsive ---- */
@media (max-width: 850px) {
  .ps-gallery-cta-card {
    flex-direction: column;
    text-align: center;
    gap: 28px;
  }

  .ps-gallery-cta-text {
    flex-basis: auto;
    text-align: center;
  }

  .ps-gallery-cta-image {
    flex-basis: auto;
    order: -1;
  }
}

@media (max-width: 720px) {
  .ps-gallery-directory .run-steps {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 20px;
  }
}

@media (max-width: 900px) {
  .psd.ps-gallery-intro .ps-gallery-container {
    padding-top: 190px;
  }

  .ps-gallery-cta-image {
    display: none;
  }

  .ps-gallery-cards-wrap .category-card-split {
    padding-block: 0;
  }

  /* Compound selector: responsive.css loads after this file and resets bottom to 50px. */
  #scroll-top.scroll-top {
    bottom: 100px;
  }
}

@media (max-width: 698px) {
  .ps-gallery-why-card-wrapper {
    gap: 20px;
  }

  .ps-gallery-why-card {
    padding: 10px;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }

  .ps-gallery-why-card .why-card-icon-wrapper {
    font-size: 1.6em;
    width: 40px;
    height: 40px;
    padding: 9px;
  }

  /* Fixed, not absolute — 290px of panel won't fit beside the icon on a phone. */
  .floating-discord-cta .floating-discord-content {
    font-size: 0.9em;
    position: fixed;
    right: 14px;
    bottom: 98px;
    width: 214px;
    height: 140px;
    padding: 12px 12px;
  }
}

@media (max-width: 560px) {
  .ps-gallery-cta-card {
    padding: 34px 24px;
  }

  .cta-title {
    font-size: 1.55em;
  }

  .ps-gallery-directory .run-arrow {
    display: none;
  }

  .ps-gallery-faq-question-row {
    padding: 12px 14px;
    align-items: flex-start;
  }

  .ps-gallery-faq-item.active .ps-gallery-faq-answer {
    padding: 0 14px 14px;
  }
}
