.s4l-community-controls,
.s4l-community-login,
.s4l-community-feed {
  box-sizing: border-box;
}

.s4l-community-form-title {
  font-size: clamp(1.5rem, 4vw, 2rem) !important;
  margin-bottom: 1.25rem !important;
}

.s4l-community-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 1.25rem;
  border: 2px solid #111;
  border-radius: 4px;
  overflow: hidden;
}

.s4l-community-tab {
  min-height: 52px;
  border: 0;
  background: #fff;
  color: #111;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.s4l-community-tab + .s4l-community-tab {
  border-left: 1px solid #111;
}

.s4l-community-tab.is-active {
  background: #111;
  color: #fff;
}

.s4l-community-wear-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.s4l-community-wear-fields[hidden] {
  display: none;
}

.s4l-community-wear-fields label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.s4l-community-wear-fields input,
.s4l-community-wear-fields select,
.s4l-community-hashtag input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #d5d5d5;
  background: #fff;
  font: inherit;
}

.s4l-community-hashtag {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  background: #f3f3f3;
}

.s4l-community-hashtag span {
  padding-left: 14px;
  font-size: 1.25rem;
  font-weight: 800;
}

.s4l-community-hashtag input {
  border: 0;
  background: transparent;
}

.s4l-community-message textarea {
  min-height: 180px;
}

.s4l-community-guideline {
  margin-top: 16px;
  color: #666;
  font-size: .78rem;
  line-height: 1.7;
}

.s4l-community-login {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid #ddd;
  background: #fff;
  text-align: center;
}

.s4l-community-login > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.s4l-community-login a {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 10px;
  font-weight: 800;
  text-decoration: none !important;
}

.s4l-community-login-button {
  background: #111;
  color: #fff !important;
}

.s4l-community-register-button {
  border: 2px solid #111;
  background: #fff;
  color: #111 !important;
}

.s4l-community-comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #666;
  font-size: .75rem;
}

.s4l-community-kind {
  padding: 4px 8px;
  background: #111;
  color: #fff;
  font-weight: 800;
}

.s4l-community-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
  color: #00a9e8;
  font-size: .8rem;
  font-weight: 700;
}

.s4l-community-like {
  float: right;
  min-width: 58px;
  padding: 7px 12px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  color: #555;
  cursor: pointer;
}

.s4l-community-like.is-active {
  border-color: #00a9e8;
  color: #00a9e8;
}

.s4l-community-like.is-readonly {
  display: inline-block;
  cursor: default;
}

.s4l-community-feed {
  margin-top: 56px;
}

.s4l-community-feed-heading {
  margin-bottom: 22px;
}

.s4l-community-feed-heading small {
  color: #00a9e8;
  font-weight: 800;
  letter-spacing: .16em;
}

.s4l-community-feed-heading h3 {
  margin: 5px 0 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.s4l-community-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.s4l-community-feed-card {
  display: block;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e1e1e1;
  background: #fff;
  color: #111 !important;
  text-decoration: none !important;
}

.s4l-community-feed-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.s4l-community-feed-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.s4l-community-feed-card p {
  margin: 14px 0;
  line-height: 1.65;
}

.s4l-community-feed-card > div:last-child {
  display: flex;
  justify-content: space-between;
  color: #888;
  font-size: .75rem;
}

@media (max-width: 600px) {
  /* Keep the article measure unchanged while giving the community UI the
     full width of the article column. SWELL otherwise nests 32px and 30px
     horizontal padding around the form. */
  .p-commentArea {
    padding-right: 0;
    padding-left: 0;
  }

  #respond.comment-respond {
    padding-right: 22px;
    padding-left: 22px;
  }

  /* The form card already supplies the visual border. Avoid a third nested
     frame around the guest sign-in actions. */
  .s4l-community-login {
    padding: 8px 0 0;
    border: 0;
  }

  .s4l-community-wear-fields,
  .s4l-community-login > div,
  .s4l-community-feed-grid {
    grid-template-columns: 1fr;
  }

  .s4l-community-tab {
    min-height: 48px;
    font-size: .9rem;
  }
}
