/*
 * RAY — HEADER DIAGNOSTIC ROOT CAUSE FIX
 * 2026-07-19
 *
 * Scope: desktop header only (>= 992px).
 *
 * This layer intentionally targets the REAL runtime wrapper created by
 * ray_desktop_header_layout_reorder_20260719.js:
 *
 *   .ray-hf-callback-reviews
 *
 * It does not depend on the obsolete .ray-header-final-stack wrapper.
 */

@media (min-width: 992px) {
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .rm-logo {
    overflow: visible !important;
  }

  /*
   * The logo PNG contains substantial transparent space around the artwork.
   * Increasing only the image box barely changes the visible logo.
   * Scale the actual rendered image instead.
   */
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .rm-logo
    img {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    max-height: 90px !important;
    height: auto !important;
    object-fit: contain !important;
    transform: scale(1.42) !important;
    transform-origin: center center !important;
  }

  /*
   * Callback + Reviews are one vertical block.
   * Reviews are always strictly below callback.
   */
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .ray-hf-callback-reviews.ray-diag-callback-reviews {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 3 !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .ray-desktop-callback-panel {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-link {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-text {
    display: block !important;
    min-width: 0 !important;
    max-width: 118px !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    text-align: left !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 0 0 48px !important;
    box-sizing: border-box !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel
    a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
  }

  /*
   * The runtime layout reserves a very wide central contact column.
   * That is why callback/reviews visually sits too close to Search.
   * Move only this combined block left; the contact block and right-side
   * actions remain untouched.
   */
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .ray-hf-callback-reviews.ray-diag-callback-reviews {
    transform: translateX(-90px) !important;
  }

  /*
   * Keep Search / Wishlist / Cart above and separate.
   */
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .rm-actions {
    position: relative !important;
    z-index: 4 !important;
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .rm-logo
    img {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    transform: scale(1.34) !important;
  }

  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .ray-hf-callback-reviews.ray-diag-callback-reviews {
    transform: translateX(-58px) !important;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .rm-logo
    img {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    transform: scale(1.22) !important;
  }

  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .ray-hf-callback-reviews.ray-diag-callback-reviews {
    transform: translateX(-24px) !important;
    width: 158px !important;
    min-width: 158px !important;
    max-width: 158px !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-link {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel {
    padding-left: 40px !important;
  }
}

/* ==========================================================
   RAY — CALLBACK / REVIEWS VISUAL POLISH
   2026-07-19

   Scope: ONLY the already-active desktop callback/reviews block.
   - dashed underline is exactly the width of the callback phrase;
   - Reviews are centered directly under the callback phrase;
   - no other header/site blocks are changed.
   ========================================================== */
@media (min-width: 992px) {
  /* Remove any inherited long divider from the generated callback block. */
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews,
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .ray-desktop-callback-panel,
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-link {
    border-bottom: 0 !important;
    text-decoration: none !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .ray-desktop-callback-panel::before,
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .ray-desktop-callback-panel::after,
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-link::before,
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-link::after {
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  /* Icon column + one shared centered text column. */
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-link {
    grid-template-columns: 40px 118px !important;
    width: 166px !important;
    max-width: 166px !important;
    min-width: 166px !important;
  }

  /* The underline belongs only to the phrase itself. */
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-text {
    display: inline-block !important;
    justify-self: center !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: 118px !important;
    padding: 0 0 3px !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.78) !important;
    text-align: center !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
  }

  /* Reviews use exactly the same text column and are centered below it. */
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    margin: 0 0 0 48px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel
    a {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-link {
    grid-template-columns: 34px 110px !important;
    width: 150px !important;
    max-width: 150px !important;
    min-width: 150px !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    .ray-desktop-callback-text {
    max-width: 110px !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    margin-left: 40px !important;
  }
}


/* ==========================================================
   RAY — CALLBACK / REVIEWS LEFT + SEPARATOR FIX
   2026-07-19

   Scope: ONLY the active desktop callback/reviews block.
   - Reviews moved slightly left and made larger;
   - vertical divider added to the LEFT of the whole block;
   - no other header/site blocks are changed.
   ========================================================== */
@media (min-width: 992px) {
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .ray-hf-callback-reviews.ray-diag-callback-reviews {
    position: relative !important;
    overflow: visible !important;
  }

  /* Divider visually matches the separators between the other header blocks. */
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .ray-hf-callback-reviews.ray-diag-callback-reviews::before {
    content: "" !important;
    position: absolute !important;
    left: -18px !important;
    top: 3px !important;
    bottom: 3px !important;
    width: 1px !important;
    background: rgba(255, 255, 255, 0.28) !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: none !important;
  }

  /* Move Reviews a little left while keeping them directly below callback. */
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel {
    margin-left: 38px !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel
    a {
    font-size: 11.5px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  body.ray-modern-body
    .rm-header
    .rm-topbar.ray-diag-header-final-active
    > .ray-hf-callback-reviews.ray-diag-callback-reviews::before {
    left: -12px !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel {
    margin-left: 33px !important;
  }

  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel
    a {
    font-size: 10.5px !important;
  }
}

/* RAY_REVIEWS_MOVE_LEFT_ONLY_20260719 */
@media (min-width: 992px) {
  body.ray-modern-body
    .rm-header
    .ray-hf-callback-reviews.ray-diag-callback-reviews
    > .rm-trust-panel {
    padding-left: 26px !important;
    transform: translateX(-10px) !important;
  }
}

/* RAY_HIDE_CITY_FEEDBACK_ONLY_20260719 */
@media (min-width: 992px) {
  body.ray-modern-body
    .rm-header
    .ray-desktop-city-phone
    .rm-phone-panel
    .rm-small-link {
    display: none !important;
  }
}
