/* LMAB Share Feedback — Drupal Olivero
   No :has() or :is() selectors. Works on the node and comment reply pages.
   Load after your existing theme CSS. */

/* Main feedback page */
.page-node-type-share-your-feedback .main-content__container {
  max-width: 1000px;
}
.page-node-type-share-your-feedback .page-title {
  display: none;
  text-align: center;
  color: #174f80;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 1.5rem 0 1rem;
}
.page-node-type-share-your-feedback .node--type-share-your-feedback > header,
.page-node-type-share-your-feedback .node--type-share-your-feedback .node__content > .links {
  display: none;
}
.page-node-type-share-your-feedback .node--type-share-your-feedback .field--name-body {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
  color: #536477;
  line-height: 1.7;
}
.throbber {width:1000px;}
/* body */

/* LMAB feedback introduction */
.page-node-type-share-your-feedback .lmab-feedback-intro {
    background: #f0f7ff;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 20px 0 30px;
}

.page-node-type-share-your-feedback .lmab-feedback-intro h2 {
    color: #174a83;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
}

.page-node-type-share-your-feedback .lmab-feedback-intro p {
    font-size: 16px;
    line-height: 1.7;
    color: #334155;
    margin: 0 0 10px;
}

.page-node-type-share-your-feedback .lmab-feedback-intro p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .page-node-type-share-your-feedback .lmab-feedback-intro {
        padding: 16px;
    }

    .page-node-type-share-your-feedback .lmab-feedback-intro h2 {
        font-size: 21px;
    }
}


/* Form on both the normal page and Drupal's validation/reply page */
form.comment-share-your-feedback-form {
  box-sizing: border-box;
  max-width: 760px;
  margin: 1.5rem auto 2.5rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: #fff;
  border: 1px solid #dce6ef;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(20, 54, 84, 0.08);
  text-align: left;
}
form.comment-share-your-feedback-form .form-item {
  margin: 0 0 1.25rem;
}
form.comment-share-your-feedback-form .form-item__label {
  display: block;
  margin-bottom: 0.5rem;
  color: #26384a;
  font-size: 1rem;
  font-weight: 650;
}
form.comment-share-your-feedback-form input[type="text"],
form.comment-share-your-feedback-form input[type="email"],
form.comment-share-your-feedback-form select,
form.comment-share-your-feedback-form textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid #bdcddd;
  border-radius: 9px;
  background: #fff;
  color: #25384b;
  font: inherit;
  line-height: 1.5;
}
form.comment-share-your-feedback-form textarea {
  min-height: 135px;
  resize: vertical;
}
form.comment-share-your-feedback-form input:focus-visible,
form.comment-share-your-feedback-form select:focus-visible,
form.comment-share-your-feedback-form textarea:focus-visible {
  outline: 3px solid rgba(29, 111, 177, 0.22);
  outline-offset: 1px;
  border-color: #1765a3;
}
form.comment-share-your-feedback-form .error,
form.comment-share-your-feedback-form [aria-invalid="true"] {
  border-color: #c62828 !important;
  background: #fffafa;
}
form.comment-share-your-feedback-form .form-item--error-message {
  color: #b42318;
  font-weight: 600;
}

/* Hide Drupal's text-format explanations, not validation */
form.comment-share-your-feedback-form .filter-wrapper {
  display: none;
}

/* Buttons */
form.comment-share-your-feedback-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
form.comment-share-your-feedback-form input[type="submit"][name="op"][value="Preview"],
form.comment-share-your-feedback-form #edit-preview {
  display: none;
}
form.comment-share-your-feedback-form input[type="submit"][name="op"][value="Save"] {
  display: inline-block;
  min-width: 175px;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 9px;
  background: #1765a3;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}
form.comment-share-your-feedback-form input[type="submit"][name="op"][value="Save"]:hover {
  background: #104c7d;
}
form.comment-share-your-feedback-form input[type="submit"][name="op"][value="Save"]:focus-visible {
  outline: 3px solid #83bdf0;
  outline-offset: 3px;
}

/* Approved feedback cards on the original page */
.page-node-type-share-your-feedback .comments {
  max-width: 850px;
  margin: 2rem auto 3rem;
}
.page-node-type-share-your-feedback .comments__title {
  margin: 2rem 0 1rem;
  color: #174f80;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  text-align: center;
}
.page-node-type-share-your-feedback .comments__count {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #e7f1fa;
  color: #174f80;
  font-size: 0.85rem;
  vertical-align: middle;
}
.page-node-type-share-your-feedback .comment {
  margin: 1rem 0;
  padding: 1.3rem 1.5rem;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(20, 54, 84, 0.05);
}
.page-node-type-share-your-feedback .comment__text-wrapper {
  width: 100%;
  min-width: 0;
}
.page-node-type-share-your-feedback .comment__picture-wrapper {
  display: none;
}
.page-node-type-share-your-feedback .comment__author {
  margin: 0;
  color: #174f80;
  font-weight: 700;
}
.page-node-type-share-your-feedback .comment__time {
  color: #6c7c8c;
  font-size: 0.85rem;
}
.page-node-type-share-your-feedback .comment__content {
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.page-node-type-share-your-feedback .comment__content h3 {
  font-size: 1.1rem;
}
.page-node-type-share-your-feedback .comment__links {
  margin-top: 0.8rem;
}

/* Error message on Drupal's separate comment submission page.
   Keeps errors visible; does not interfere with server validation. */
.path-comment .messages--error {
  max-width: 760px;
  margin: 1rem auto;
  border-radius: 10px;
}
.path-comment .main-content__container {
  max-width: 1000px;
}
.path-comment .page-title {
  display: block;
  text-align: center;
  color: #174f80;
  margin: 1.5rem 0 1rem;
}
.path-comment .node--type-share-your-feedback > header,
.path-comment .node--type-share-your-feedback .node__content > .links {
  display: none;
}
/* LMAB feedback - simplify public comments */
.page-node-type-share-your-feedback .comment__content > h3,
.page-node-type-share-your-feedback .comment__links {
    display: none;
}
/* Hide original Drupal name input */
.page-node-type-share-your-feedback
.comment-form .form-item-name,
.comment__author{
    display: none;
}

/* Parent name in approved feedback */
.page-node-type-share-your-feedback .comment .field--name-field-parent-name {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 8px;
}
/* Display Anonymous when Parent Name is empty */
/* Show Anonymous when Parent Name is missing */


/* Hide Drupal's original author */
.page-node-type-share-your-feedback .comment__author {
    display: none;
}

/* Display Parent Name */
.page-node-type-share-your-feedback
.comment .field--name-field-parent-name {
    color: #2563eb;
    font-size: 18px;
    font-weight: 700;
}

/* Responsive parent-uploaded images */
.page-node-type-share-your-feedback
.comment .field--name-field-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    border-radius: 10px;
    margin-top: 12px;
}


/* Gifts Received - compact checkbox layout */
.page-node-type-share-your-feedback
.comment-form #edit-field-gifts-received {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Two columns */
.page-node-type-share-your-feedback
.comment-form #edit-field-gifts-received .form-item {
    display: flex;
    align-items: center;
    width: 46%;
    margin: 0;
    padding: 8px;
    gap: 10px;
}

/* Checkbox size */
.page-node-type-share-your-feedback
.comment-form #edit-field-gifts-received input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
}

/* Label beside checkbox */
.page-node-type-share-your-feedback
.comment-form #edit-field-gifts-received label {
    display: inline-block;
    margin: 0;
    padding: 0;
    font-size: 15px;
    cursor: pointer;
}

/* Mobile - one column */
@media (max-width: 600px) {
    .page-node-type-share-your-feedback
    .comment-form #edit-field-gifts-received .form-item {
        width: 100%;
    }
}


/* Gifts Received - published comments */
.page-node-type-share-your-feedback
.comment .field--name-field-gifts-received {
    margin: 15px 0;
}

/* Field heading */
.page-node-type-share-your-feedback
.comment .field--name-field-gifts-received .field__label {
    font-weight: 700;
    margin-bottom: 10px;
}

/* Each selected gift */
.page-node-type-share-your-feedback
.comment .field--name-field-gifts-received .field__item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 15px;
}

/* Green checkmark */
.page-node-type-share-your-feedback
.comment .field--name-field-gifts-received .field__item::before {
    content: "\2713";
    color: #16a34a;
    font-size: 18px;
    font-weight: 700;
}

/* Center Gifts Received items */
.page-node-type-share-your-feedback
.comment .field--name-field-gifts-received .field__items {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Center checkmarks and text */
.page-node-type-share-your-feedback
.comment .field--name-field-gifts-received .field__item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin-bottom: 8px;
}


/* Mobile devices */
@media (max-width: 600px) {
    .page-node-type-share-your-feedback
    .comment .field--name-field-image img {
        max-height: 350px;
    }
}
@media (max-width: 600px) {
  form.comment-share-your-feedback-form {
    margin: 1rem auto 2rem;
    padding: 1.2rem;
    border-radius: 12px;
  }
  form.comment-share-your-feedback-form input[type="submit"][name="op"][value="Save"] {
    width: 100%;
  }
  .page-node-type-share-your-feedback .comment {
    padding: 1rem;
  }
}



/* Center Share page content */
.page-node-type-share-your-feedback
.region--content-above,
.page-node-type-share-your-feedback
.region--content {
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Center page introduction */
.page-node-type-share-your-feedback
.node__content > .field--name-body {
    text-align: center;
}

/* Center Community Experiences heading */
.page-node-type-share-your-feedback
.comments__title {
    text-align: center;
}

/* Keep form fields readable */
.page-node-type-share-your-feedback
.comment-form {
    text-align: left;
}
/* Center the entire LMAB Share page */
@media (min-width: 768px) {
    body.page-node-type-share-your-feedback
    .main-content__container {
        width: 100%;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    body.page-node-type-share-your-feedback
    .layout-main {
        display: flex;
        justify-content: center;
    }

    body.page-node-type-share-your-feedback
    .main-content {
        width: 100%;
        max-width: 1040px;
    }
}

/* Center images in published LMAB comments */
.page-node-type-share-your-feedback
.comment .field--name-field-image img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
}
/* Hide original text visually */
.page-node-type-share-your-feedback
#edit-field-organization-website-0-uri--description {
    font-size: 0;
    line-height: 0;
    height: 22px;
    overflow: hidden;
    position: relative;
    max-width: none;
    width: 100%;
}

/* Show replacement text */
.page-node-type-share-your-feedback
#edit-field-organization-website-0-uri--description::after {
    content: "Example: https://example.com";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: normal;
    white-space: nowrap;
    color: #64748b;
}

/* Replace Your Email help text */
.page-node-type-share-your-feedback
#edit-field-your-email-0-value--description {
    font-size: 0;
    line-height: 0;
    height: 22px;
    overflow: hidden;
    position: relative;
    max-width: none;
    width: 100%;
}

/* Display custom email message */
.page-node-type-share-your-feedback
#edit-field-your-email-0-value--description::after {
    content: "Your email address will not be displayed publicly.";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: normal;
    white-space: normal;
    color: #64748b;
}