
.event-share-panel,
.event-flag-panel {
  position: relative;
  z-index: 1;

  margin-top: -34px;
  padding-top: 34px;

  margin-left: 6px;
  margin-right: 6px;

  opacity: 0;
  transform: translateY(-28px);   /* stronger upward closed position */
  max-height: 0;
  overflow: visible;
  pointer-events: none;

  transition:
    max-height 260ms ease,
    opacity 180ms ease,
    transform 260ms ease;
}

.event-stack.share-open .event-share-panel,
.event-stack.flag-open .event-flag-panel {
  opacity: 1;
  transform: translateY(0);
  max-height: 420px;
  pointer-events: auto;
}

.event-share-panel-inner,
.event-flag-panel-inner {
  position: relative;
  top: -24px;
  background: #f7f7f4;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 2.5rem 1rem 1rem;
}

.event-share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
  justify-items: center;
  align-items: center;
  width: 94%;
  margin: 0 auto;
}

.event-share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  width: 100%;
  max-width: 120px;
  padding: 10px 4px 6px;

  border: none;
  background: none;
  text-decoration: none;
  color: inherit;
  font: inherit;

  cursor: pointer;

  opacity: 0.75;

  transition:
    transform 0.16s ease,
    opacity 0.16s ease;
}

.event-share-option:hover {
  opacity: 1;
  transform: scale(1.08);
}

.event-share-option:active {
  transform: scale(0.92);
}

.event-share-option-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 10px;

  stroke-width: 2.2;
  color: #8f8f8f;

  transition: transform 0.16s ease, color 0.16s ease;
}

.event-share-option:hover .event-share-option-icon {
  color: #5f5f5f;
}

.event-share-option-label {
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-main);
}

.share-image-condition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.share-image-condition-tag {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.2;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  white-space: nowrap;
}

.share-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 760px;
  height: auto;
  border-radius: 14px;
}

.share-image-license {
  opacity: 0.82;
  white-space: nowrap;
}

.share-image-description {
  font-size: 1rem;
  line-height: 1.58;
  color: #2d2d2d;
  margin-top: 22px;
  margin-bottom: 22px;
}

.share-image-card {
  width: 760px;
  background: #eaf1e2;
  color: #222;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
  padding: 22px;
  font-family: "Avenir Next", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  display: block;
  overflow: hidden;
}

.share-image-condition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.share-image-condition-tag {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.2;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  white-space: nowrap;
}

.share-image-title {
  display: block;
  position: relative;
  z-index: 2;
  margin: 0 0 18px 0;
  font-size: 1.75rem;
  line-height: 1.16;
  font-weight: 800;
  color: #1f1f1f;
  white-space: normal;
  overflow-wrap: break-word;
}

.share-image-wrap {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 0 10px 0;
}

.share-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 760px;
  border-radius: 14px;
  vertical-align: top;
  object-fit: contain;
}

.share-image-credit {
  margin: 0 0 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #6b6b6b;
}

.share-image-description {
  font-size: 1rem;
  line-height: 1.58;
  color: #2d2d2d;
}

.share-image-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.share-image-footer-line {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #6b6b6b;
  margin-top: 4px;
  word-break: break-word;
}

.share-image-link-text {
  color: #4d4d4d;
}

.share-image-site-cta {
  display: none;
  margin-top: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2a5f2a;
  text-align: center;
}

.share-image-site-cta .share-image-link-text {
  margin-left: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #406440;
}

.event-share-option.is-busy,
.event-share-option.is-done,
.event-share-option.is-error {
  opacity: 1;
}

.event-share-option.is-busy {
  cursor: default;
}

.event-share-option.is-busy:hover {
  transform: none;
}

.event-share-option.is-busy:active {
  transform: none;
}

.event-share-option.is-busy .event-share-option-icon {
  animation: share-spin 1s linear infinite;
  color: #5f6d61;
}

.event-share-option.is-done .event-share-option-icon {
  color: var(--accent);
}

.event-share-option.is-error .event-share-option-icon {
  color: #b14a4a;
}

@keyframes share-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.share-image-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-top: 6px;
  margin-bottom: 22px;
}

.share-image-site-mark {
  font-size: 0.82rem;
  flex: 0 0 auto;
  max-width: 42%;
  font-weight: 600;
  line-height: 1.25;
  color: #2f6430;
  opacity: 70;
  text-align: left;
}

.share-image-site-mark .share-image-link-text {
  margin-left: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #355f35;
}

.share-image-meta-right {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.share-image-credit,
.share-image-source {
  font-size: 0.78rem;
  line-height: 1.1;
  color: #7a7a7a;
}

.share-image-source {
  margin-top: 2px;
  margin-bottom: 0px;
}

.share-image-credit a,
.share-image-source a {
  color: inherit;
  text-decoration: none;
}