@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700&display=swap");

:root {
  --community-blue: #0b3877;
  --community-blue-dark: #0a3877;
  --community-orange: #ff5a00;
  --community-text: #393939;
  --community-text-secondary: #425466;
  --community-border: #f3e4e4;
  --community-subnav-bg: #edfaff;
  --community-sort-bg: rgba(78, 193, 239, 0.09);
  --community-card-radius: 21px;
  --community-pill-radius: 113px;
}

body {
  background-color: #fff;
  font-family: Inter, Mulish, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--community-text);
}

.community-content {
  display: flex;
  flex-direction: row;
  gap: 5%;
}

.community-content__main {
  width: 65%;
  flex-shrink: 0;
}

.community-content__side {
  width: 30%;
  flex-shrink: 0;
}

.community-content .community-section {
  margin-top: 0;
}

.community-section {
  margin-top: 42px;
}

.community-section h3 {
  color: var(--community-text-secondary);
  font-family: Inter, Mulish, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 16px;
}

.community-home-search {
  background: transparent;
  border: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.banner-left .community-home-search {
  margin-top: 0.25rem;
  max-width: 100%;
}

.community-home-search .landing-search-wrap {
  margin: 0;
  max-width: 100%;
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .community-home-search .landing-search-wrap {
    max-width: min(380px, 100%);
  }
}

.community-home-search .landing-search-wrap .search-icon {
  color: rgba(123, 135, 148, 0.64);
  height: 18px;
  left: 17px;
  width: 18px;
}

.community-home-search .landing-search-wrap .search {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.19);
  border-radius: 117px;
  box-shadow: none;
  height: 53px;
  margin: 0;
  max-width: 100%;
  width: 100%;
}

.community-home-search .landing-search-wrap .search:focus-within {
  border-color: rgba(0, 0, 0, 0.19);
  box-shadow: none;
}

.community-home-search .landing-search-wrap .search input[type="search"] {
  background: #fff;
  border: none;
  border-radius: 117px;
  box-shadow: none;
  color: #425466;
  font-family: Inter, Mulish, sans-serif;
  font-size: 16px;
  font-weight: 500;
  height: 53px;
  line-height: 24px;
  padding-left: 44px;
  padding-right: 20px;
}

.community-home-search .landing-search-wrap .search input[type="search"]::placeholder {
  color: #425466;
  font-weight: 500;
  opacity: 1;
}

.community-home-search .landing-search-wrap .search input[type="search"]:focus {
  border: none;
  box-shadow: none;
  color: #393939;
  outline: none;
}

.scad-banner-wrapper + .container > .community-section:first-child {
  margin-top: 32px;
}

.list-component {
  background-color: #fff;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--community-border);
  border-radius: var(--community-card-radius);
  overflow: hidden;
}

.list-component a:visited {
  color: var(--community-text) !important;
}

.list-item {
  border-bottom: 1px solid var(--community-border);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  color: var(--community-text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.list-item:hover,
.list-item:focus-visible {
  background-color: #fafbfc;
  text-decoration: none;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item .left-items {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.list-item .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.list-item .avatar.avatar-initials {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
}

.discussion-item .avatar {
  width: 48px;
  height: 48px;
}

.discussion-item .avatar.avatar-initials {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  font-size: 14px;
}

.list-item .rank {
  color: var(--community-text-secondary);
  font-size: 14px;
  font-weight: 600;
  min-width: 28px;
  flex-shrink: 0;
}

.list-item .title-and-subheader {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.list-item .right-items {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  text-align: right;
  flex-shrink: 0;
  color: var(--community-text);
  font-size: 16px;
  font-weight: 500;
}

.list-item .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--community-text);
  line-height: 1.35;
}

.list-item .subheader {
  font-size: 14px;
  color: var(--community-text-secondary);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.discussions-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.discussions-section-header h3 {
  margin: 0;
}

.discussions-list-locked {
  position: relative;
}

.discussions-list-locked--active .discussions-list-locked__panel {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.discussions-list-locked__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
}

.discussions-list-locked__message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: 1px solid var(--community-border);
  border-radius: var(--community-card-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 32px rgba(10, 56, 119, 0.12);
  color: var(--community-text) !important;
  font-family: Inter, Mulish, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.discussions-list-locked__message:hover,
.discussions-list-locked__message:focus-visible {
  color: var(--community-text) !important;
  text-decoration: underline;
}

.status-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: capitalize;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-chip--answered {
  background-color: #ecfccb;
  color: #3f6212;
}

.status-chip--completed {
  background-color: #ecfccb;
  color: #3f6212;
}

.status-chip--planned {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-chip--not_planned {
  background-color: #f3f4f6;
  color: #374151;
}

.discussions-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.discussions-sort-label {
  font-size: 14px;
  color: var(--community-text-secondary);
  white-space: nowrap;
}

.discussions-sort-select {
  appearance: none;
  background-color: var(--community-sort-bg);
  border: 1px solid rgba(78, 193, 239, 0.25);
  border-radius: var(--community-pill-radius);
  padding: 8px 36px 8px 16px;
  font-family: Inter, Mulish, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--community-text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23425466' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.discussions-sort-select:focus {
  outline: none;
  border-color: rgba(10, 56, 119, 0.45);
  box-shadow: 0 0 0 2px rgba(10, 56, 119, 0.12);
}

.post-to-community .button {
  background: var(--ma-button-accent, var(--community-orange)) !important;
  border: none;
  border-radius: var(--community-pill-radius);
  color: #fff !important;
  font-family: Inter, Mulish, sans-serif;
  font-size: 14px;
  font-weight: 600;
  height: 40px;
  line-height: 1;
  padding: 0 22px;
  width: auto;
}

.post-to-community .button::after {
  display: none;
}

.post-to-community .button:hover,
.post-to-community .button:focus,
.post-to-community .button:active {
  background: var(--ma-button-accent-hover, #e65100) !important;
  color: #fff !important;
}

.comments-count,
.votes-sum {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--community-text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.discussion-item .right-items .votes-sum {
  order: 1;
}

.discussion-item .right-items .comments-count {
  order: 2;
}

.comments-count svg,
.votes-sum svg {
  color: var(--community-text-secondary);
  flex-shrink: 0;
}

#js-featured-articles-grid .landing-task--community {
  align-items: flex-start;
  border: 1px solid var(--community-border);
  border-radius: var(--community-card-radius);
  flex: 0 0 min(629px, 48%);
  justify-content: space-between;
  min-height: 184px;
  padding: 24px;
  text-align: left;
}

#js-featured-articles-grid .landing-task--community > span:not(.landing-task__icon) {
  font-family: Inter, Mulish, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

#js-featured-articles-grid .landing-task--community::after {
  align-items: center;
  background: var(--community-orange);
  border-radius: var(--community-pill-radius);
  color: #fff;
  content: "View more";
  display: inline-flex;
  font-family: Inter, Mulish, sans-serif;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  line-height: 1;
  margin-top: 16px;
  padding: 10px 24px;
  pointer-events: none;
}

#js-featured-articles-grid .landing-task--community:hover {
  border-color: #e8d4d4;
  box-shadow: 0 8px 24px rgba(10, 56, 119, 0.08);
}

#js-featured-articles-grid .grid-items-skeleton {
  border-color: var(--community-border);
  border-radius: var(--community-card-radius);
  flex: 0 0 min(629px, 48%);
  min-height: 184px;
}

.empty-items {
  color: var(--community-text-secondary);
  font-size: 14px;
  margin: 0;
  padding: 20px;
  text-align: center;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

.list-skeleton__avatar,
.list-skeleton__line,
.list-skeleton__badge {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s infinite linear;
}

.list-skeleton {
  pointer-events: none;
  justify-content: space-between;
}

.list-skeleton__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-skeleton__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.list-skeleton__lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-skeleton__line--title {
  width: 200px;
  height: 14px;
}

.list-skeleton__line--sub {
  width: 120px;
  height: 12px;
}

.list-skeleton__right {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.list-skeleton__badge {
  width: 32px;
  height: 14px;
}

.discussions-load-more {
  display: block;
  margin: 16px auto 0;
  padding: 10px 28px;
  background-color: #fff;
  color: var(--community-text);
  border: 1px solid var(--community-border);
  border-radius: var(--community-pill-radius);
  font-family: Inter, Mulish, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.discussions-load-more[hidden] {
  display: none;
}

.discussions-load-more:hover:not(:disabled) {
  background-color: #fafbfc;
  border-color: #e8d4d4;
  box-shadow: 0 2px 8px rgba(10, 56, 119, 0.06);
}

.discussions-load-more:focus-visible {
  outline: none;
  border-color: var(--community-blue);
  box-shadow: 0 0 0 3px rgba(10, 56, 119, 0.15);
}

.discussions-load-more:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.community-help {
  background-color: #fff;
  padding: 20px;
  border: 1px solid var(--community-border);
  border-radius: var(--community-card-radius);
}

.community-content__side .community-section + .community-section {
  margin-top: 42px;
}

@media (max-width: 991px) {
  .community-content {
    flex-direction: column;
    gap: 0;
  }

  .community-content__main,
  .community-content__side {
    width: 100%;
  }

  .community-content__side {
    margin-top: 8px;
  }

  #js-featured-articles-grid .landing-task--community,
  #js-featured-articles-grid .grid-items-skeleton {
    flex: 0 0 85%;
  }
}

@media (max-width: 767px) {
  .banner-left .community-home-search {
    margin-top: 0.5rem;
  }

  .community-home-search .landing-search-wrap .search,
  .community-home-search .landing-search-wrap .search input[type="search"] {
    font-size: 16px;
    height: 48px;
  }

  .community-home-search .landing-search-wrap .search-icon {
    height: 16px;
    left: 16px;
    width: 16px;
  }

  .community-home-search .landing-search-wrap .search input[type="search"] {
    padding-left: 40px;
  }

  .scad-banner-wrapper + .container > .community-section:first-child {
    margin-top: 24px;
  }

  .discussions-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .discussions-header-actions {
    width: 100%;
  }

  .post-to-community {
    margin-left: auto;
  }

  .list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .list-item .right-items {
    align-self: flex-end;
    gap: 20px;
  }

  #js-featured-articles-grid .landing-task--community,
  #js-featured-articles-grid .grid-items-skeleton {
    flex: 0 0 88%;
    min-height: 160px;
  }
}
