/* =========================================================
   Galactic Polymath Widget Stylesheet
   Version: 20251013
   Author: Galactic Polymath
   Purpose: Minimal, responsive embed for unit promo cards
   ========================================================= */

.gp-widget {
  font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  width: 100%;
  max-width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  margin: 1rem auto;
}

.gp-card {
  position: relative;
  background: linear-gradient(6deg, rgb(255, 249, 253) 91%, rgba(220, 193, 255, 1) 101%);
  color: rgba(78, 90, 92, 1);
  border-radius: 15px;
  border: 2px solid #363636;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  overflow: visible;
  max-width: 640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 1.25rem;
}

.gp-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: rgb(166, 103, 247);
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 8px 10px 3px 15px;
  border-radius: 0px 14px 0px 20px;
  border: 0.5px solid #363636;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.gp-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 10px 0 0 0;
}

.gp-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(78, 90, 92, 1);
  margin: 0 0 6px 0;
}

.gp-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-bottom: 1rem;
}

.gp-banner img {
  width: 100%;
  display: block;
  height: auto;
  border: 1px solid lightgray;
}

.gp-sponsor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  bottom: 0.25rem;
  right: 0.25rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0.5rem;
  border-radius: 0.5rem;
  backdrop-filter: blur(3px);
}

.gp-sponsor-text {
  font-size: 0.85em;
  color: #333;
  font-weight: 300;
  text-transform: lowercase;
  letter-spacing: normal;
}

.gp-sponsor-img {
  height: 50px !important;
  width: auto !important;
}

.gp-gist {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 6px;
  color: rgba(78, 90, 92, 1);
  border: 1px solid rgba(220, 193, 255, 0.5);
  padding: 6px;
  border-radius: 10px;
}

.gp-gist p,
.gp-gist ul,
.gp-gist ol {
  margin: 0;
}

.gp-gist p + p,
.gp-gist p + ul,
.gp-gist p + ol,
.gp-gist ul + p,
.gp-gist ol + p {
  margin-top: 0.6rem;
}

.gp-gist ul,
.gp-gist ol {
  padding-left: 1.2rem;
}

.gp-gist li + li {
  margin-top: 0.25rem;
}

.gp-gist a {
  color: #2c83c3;
  text-decoration: underline;
}

.gp-video {
  border: 2px solid #363636;
  padding: 0;
  margin: 6px;
  overflow: hidden;
}

.gp-video-inner {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
}

.gp-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* FIX 2: Made button opaque with white text for high contrast */
.gp-button {
  align-self: center;
  display: inline-block;
  background-color: rgb(166, 103, 247);
  color: #ffffff !important; /* Explicitly white text */
  font-weight: 600;
  
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2rem;
  border: none;
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  /* FIX 3: Added transition for smooth hover animation */
  transition: all 0.3s ease;
  margin: 0.5rem 0 1rem; /* Reduced bottom margin */
  cursor: pointer;
}

.gp-button:link,
.gp-button:visited,
.gp-button:hover,
.gp-button:focus,
.gp-button:active {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* FIX 3: New hover effect with a brighter color */
.gp-button:hover {
  background-color: rgb(190, 130, 255); /* Brighter purple */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* FIX 1: Positioned logo inside the card's padding area */
.gp-logo-link {
  display: inline-flex;
  align-self: flex-end;
}

.gp-logo {
  margin-left: auto;
  margin-right: 0;
  display: block;
  bottom: 0.5rem; /* Aligns with card padding */
  right: 1.25rem; /* Aligns with card padding */
  height: 15px !important;
  width: auto !important;
}

/* (Rest of the CSS remains the same) */

@media (max-width: 480px) {
  .gp-title { font-size: 1.4rem; }
  .gp-subtitle { font-size: 0.9rem; }
  .gp-gist { font-size: 0.9rem; }
  .gp-button { width: auto; text-align: center; }
}

.gp-card *, .gp-widget * { box-sizing: inherit; }
.gp-card img, .gp-banner img, .gp-logo { max-width: 100%; height: auto; }
.gp-card a { color: inherit; }
.gp-card a:focus-visible, .gp-button:focus-visible {
  outline: 2px solid rgb(166, 103, 247);
  outline-offset: 3px;
}
