/* Community section styles for yemenilaw.com */
.yl-community-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px;
}

.yl-community-hero {
  border-radius: 28px;
  padding: 28px 22px;
  background: linear-gradient(180deg, #10245a 0%, #071735 100%);
  color: #fff;
  border: 1px solid rgba(214, 178, 90, .35);
  box-shadow: 0 22px 52px rgba(0, 0, 0, .18);
}

.yl-community-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #3b2a00;
  background: linear-gradient(180deg, #f8de85, #c99821);
  font-weight: 900;
}

.yl-community-hero h1,
.yl-community-hero h2 {
  margin: 14px 0 10px;
  color: #fff;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.45;
}

.yl-community-hero p {
  max-width: 900px;
  color: #e8efff;
  line-height: 2;
  font-weight: 800;
}

.yl-community-actions,
.yl-community-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.yl-community-button,
.yl-community-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #d6b25a;
  background: #fffdf5;
  color: #0b225a;
  text-decoration: none;
  font-family: Cairo, Tahoma, Arial, sans-serif;
  font-weight: 900;
  cursor: pointer;
}

.yl-community-button.primary,
.yl-community-link-button.primary {
  color: #3b2a00;
  background: linear-gradient(180deg, #f7d774, #c99821);
  box-shadow: 0 14px 28px rgba(201, 152, 33, .22);
}

.yl-community-section {
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .10);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.yl-community-section h2,
.yl-community-section h3 {
  margin: 0 0 10px;
  color: #0b225a;
  line-height: 1.55;
}

.yl-community-section p {
  color: #334155;
  line-height: 2;
  font-weight: 700;
}

.yl-community-grid,
.yl-community-posts {
  display: grid;
  gap: 14px;
}

.yl-community-posts {
  margin-top: 14px;
}

.yl-community-post {
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .12);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.yl-community-post h2,
.yl-community-post h3 {
  margin: 0 0 8px;
  color: #0b225a;
  font-size: 1.12rem;
  line-height: 1.7;
}

.yl-community-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: #64748b;
  font-weight: 800;
  font-size: .92rem;
}

.yl-community-post-content,
.yl-community-comment-content {
  white-space: pre-wrap;
  color: #172033;
  line-height: 2;
  font-weight: 700;
}

.yl-community-status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, .10);
  font-weight: 900;
  line-height: 1.8;
}

.yl-community-status.success {
  background: #f0fdf4;
  color: #166534;
  border-color: rgba(22, 101, 52, .20);
}

.yl-community-status.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: rgba(153, 27, 27, .20);
}

.yl-community-form {
  display: grid;
  gap: 14px;
}

.yl-community-form label {
  display: grid;
  gap: 7px;
  color: #0f172a;
  font-weight: 900;
}

.yl-community-form input,
.yl-community-form textarea,
.yl-community-form select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
  color: #172033;
  font-family: Cairo, Tahoma, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.yl-community-form textarea {
  min-height: 190px;
  resize: vertical;
  line-height: 1.9;
}

.yl-community-inline-form textarea {
  min-height: 92px;
}

.yl-community-form small {
  color: #64748b;
  font-weight: 800;
  line-height: 1.8;
}

.yl-community-check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.9;
}

.yl-community-check input {
  width: auto;
  margin-top: 7px;
}

.yl-community-admin-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.yl-community-admin-bar input {
  min-height: 46px;
}

.yl-community-admin-controls,
.yl-community-interactions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.yl-community-interactions {
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, .08);
}

.yl-community-action-button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .16);
  background: #f8fafc;
  color: #0b225a;
  font-family: Cairo, Tahoma, Arial, sans-serif;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.yl-community-action-button.active {
  background: #fff7df;
  border-color: #d6b25a;
  color: #6b4a00;
}

.yl-community-comments {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.yl-community-comment {
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .10);
}

.yl-community-comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: .88rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.yl-community-comment-form {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #fffdf5;
  border: 1px solid rgba(214, 178, 90, .28);
}

.yl-community-inline-fields {
  display: grid;
  gap: 10px;
}

.yl-community-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(2, 6, 23, .55);
  padding: 14px;
}

.yl-community-modal-backdrop.open {
  display: flex;
}

.yl-community-modal {
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.yl-member-layout {
  display: grid;
  gap: 16px;
}

.yl-member-panel {
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .10);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

.yl-member-card,
.yl-conversation-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .10);
}

.yl-member-name {
  color: #0b225a;
  font-weight: 900;
}

.yl-member-handle {
  color: #64748b;
  font-weight: 800;
  direction: ltr;
  text-align: right;
}

.yl-message-thread {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .10);
}

.yl-message-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .10);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.yl-message-bubble.mine {
  justify-self: end;
  background: #fff7df;
  border-color: rgba(214, 178, 90, .36);
}

.yl-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: .82rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.yl-message-body {
  white-space: pre-wrap;
  color: #172033;
  line-height: 1.9;
  font-weight: 800;
}

.yl-community-muted {
  color: #64748b;
  font-weight: 800;
}

@media (min-width: 760px) {
  .yl-community-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .yl-community-inline-fields {
    grid-template-columns: 1fr 1fr;
  }

  .yl-member-layout {
    grid-template-columns: 330px 1fr;
    align-items: start;
  }
}

@media (max-width: 700px) {
  .yl-community-shell {
    padding: 12px;
  }

  .yl-community-hero,
  .yl-community-section {
    border-radius: 20px;
  }

  .yl-community-admin-bar {
    grid-template-columns: 1fr;
  }

  .yl-message-bubble {
    max-width: 96%;
  }
}
