/**
 * Grantaura Smart Related Grants Widget
 * Clean List Design - Simple Underline
 */

.grantaura-srgw-widget {
  --ga-text: #1d1d1f;
  --ga-text-secondary: #6e6e73;
  --ga-text-muted: #86868b;
  --ga-accent: #5A3B8C;
  --ga-success: #34c759;
  --ga-border: rgba(0,0,0,0.08);
  
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ga-text);
  margin: 40px 0;
}

.grantaura-srgw-widget ol.srgw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: grant;
}

.grantaura-srgw-widget .srgw-item {
  position: relative;
  padding: 28px 0;
  border-top: 1px solid var(--ga-border);
  counter-increment: grant;
}

.grantaura-srgw-widget .srgw-item:first-child {
  border-top: none;
  padding-top: 0;
}

.grantaura-srgw-widget .srgw-item::before {
  content: counter(grant);
  position: absolute;
  left: 0;
  top: 28px;
  font-size: 44px;
  font-weight: 200;
  color: #d1d1d6;
  line-height: 1;
}

.grantaura-srgw-widget .srgw-item:first-child::before {
  top: 0;
}

.grantaura-srgw-widget .srgw-item-content {
  margin-left: 64px;
}

.grantaura-srgw-widget .srgw-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.grantaura-srgw-widget .srgw-item-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

/* Simple underline on links */
.grantaura-srgw-widget .srgw-item-title a {
  color: var(--ga-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.grantaura-srgw-widget .srgw-item-title a:hover {
  color: var(--ga-accent);
}

/* Verified tag inline */
.grantaura-srgw-widget .srgw-verified-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  background: var(--ga-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 3px;
  transform: skewX(-8deg);
  vertical-align: middle;
}

.grantaura-srgw-widget .srgw-verified-tag span {
  display: inline-block;
  transform: skewX(8deg);
}

.grantaura-srgw-widget .srgw-item-amount {
  font-size: 17px;
  font-weight: 600;
  color: var(--ga-accent);
  white-space: nowrap;
}

.grantaura-srgw-widget .srgw-item-description {
  margin: 0 0 14px 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ga-text-secondary);
}

.grantaura-srgw-widget .srgw-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 14px;
}

.grantaura-srgw-widget .srgw-meta-donor {
  font-weight: 500;
  color: var(--ga-text);
}

.grantaura-srgw-widget .srgw-meta-deadline {
  color: var(--ga-success);
  font-weight: 500;
}

.grantaura-srgw-widget .srgw-meta-deadline--expired {
  color: var(--ga-text-muted);
  text-decoration: line-through;
}

.grantaura-srgw-widget .srgw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Simple underline on tags */
.grantaura-srgw-widget a.srgw-tag {
  color: var(--ga-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
  font-weight: 500;
}

.grantaura-srgw-widget a.srgw-tag:hover {
  color: var(--ga-text);
}

.grantaura-srgw-widget .srgw-item--expired {
  opacity: 0.6;
}

.grantaura-srgw-widget .srgw-item--expired .srgw-item-title a {
  color: var(--ga-text-secondary);
}

.grantaura-srgw-widget .srgw-item--expired .srgw-item-amount {
  color: var(--ga-text-muted);
  text-decoration: line-through;
}

.grantaura-srgw-widget .srgw-expired-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--ga-border);
}

.grantaura-srgw-widget .srgw-toggle-expired {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: #f5f5f7;
  border: none;
  border-radius: 8px;
  color: var(--ga-text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.grantaura-srgw-widget .srgw-toggle-expired:hover {
  background: #e8e8ed;
  color: var(--ga-text);
}

.grantaura-srgw-widget .srgw-toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  background: var(--ga-text-muted);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  margin-left: 8px;
}

.grantaura-srgw-widget .srgw-toggle-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.grantaura-srgw-widget .srgw-toggle-expired[aria-expanded="true"] .srgw-toggle-icon {
  transform: rotate(180deg);
}

.grantaura-srgw-widget .srgw-expired-list {
  margin-top: 20px;
}

.grantaura-srgw-widget .srgw-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--ga-border);
}

.grantaura-srgw-widget .srgw-footer-note {
  margin: 0;
  font-size: 13px;
  color: var(--ga-text-muted);
}

@media (max-width: 640px) {
  .grantaura-srgw-widget .srgw-item::before {
    font-size: 32px;
  }
  .grantaura-srgw-widget .srgw-item-content {
    margin-left: 44px;
  }
  .grantaura-srgw-widget .srgw-item-header {
    flex-direction: column;
    gap: 8px;
  }
  .grantaura-srgw-widget .srgw-item-amount {
    align-self: flex-start;
  }
}

@media print {
  .grantaura-srgw-widget .srgw-toggle-expired,
  .grantaura-srgw-widget .srgw-expired-list {
    display: none;
  }
}
