/*
 * Ironhand client component compatibility layer.
 * Loaded after client module styles so every client-facing route keeps the
 * same white, graphite and Ironhand-red visual language.
 */

/* Remaining core client views */
body.customers:not(.customers_login) nav.navbar.header.navbar-default .navbar-collapse .navbar-nav > li.active > a,
body.customers:not(.customers_login) nav.navbar.header.navbar-default .navbar-collapse .navbar-nav > li.active > a:hover,
body.customers:not(.customers_login) nav.navbar.header.navbar-default .navbar-collapse .navbar-nav > li.active > a:focus {
  background: #f9ece9 !important;
  box-shadow: inset 0 0 0 1px rgba(169, 50, 38, 0.1);
  color: #81251d !important;
}

body.customers:not(.customers_login) nav.navbar.header.navbar-default .navbar-collapse .navbar-nav > li.active > a i {
  color: #a93226 !important;
}

body.ih-client-portal .ih-portal-page > .tw-flex:first-child {
  align-items: center !important;
  flex-wrap: wrap;
  gap: 12px;
}

body.ih-client-portal .announcement-date {
  background: #f8fafc;
  border: 1px solid #e2e7ee;
  border-radius: 999px;
  color: #68758a;
  display: inline-flex;
  font-size: 11px;
  margin-top: 12px !important;
  padding: 6px 10px;
}

body.ih-client-portal .announcement-content,
body.ih-client-portal .privacy-policy,
body.ih-client-portal .terms-and-conditions-content,
body.ih-client-portal .tc-content {
  color: #3d495c;
  font-size: 14px;
  line-height: 1.75;
}

body.ih-client-portal .announcement-content img,
body.ih-client-portal .privacy-policy img,
body.ih-client-portal .terms-and-conditions-content img,
body.ih-client-portal .tc-content img {
  border-radius: 12px;
  height: auto;
  max-width: 100%;
}

body.ih-client-portal .privacy-policy-heading,
body.ih-client-portal .terms-and-conditions-heading,
body.ih-client-portal .verification-required-heading,
body.ih-client-portal .company-profile-heading,
body.ih-client-portal .company-profile-billing-shipping-heading {
  color: #111827;
  font-weight: 760;
  letter-spacing: -0.03em;
}

body.ih-client-portal .verification-required-alert {
  border-left: 3px solid #a93226 !important;
  margin-bottom: 0 !important;
}

body.ih-client-portal #contact-form .panel_s,
body.ih-client-portal .section-announcement,
body.ih-client-portal .section-products {
  border-top: 3px solid #a93226 !important;
}

body.ih-client-portal #contact_email_notifications,
body.ih-client-portal .attachments_area,
body.ih-client-portal .attachments,
body.ih-client-portal .attachment {
  background: #f8fafc;
  border: 1px solid #e2e7ee;
  border-radius: 12px;
}

body.ih-client-portal #contact_email_notifications {
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 16px;
}

body.ih-client-portal .attachments_area,
body.ih-client-portal .attachments {
  padding: 14px;
}

body.ih-client-portal .attachment {
  margin-bottom: 8px;
  padding: 10px 12px;
}

body.ih-client-portal .table-image img,
body.ih-client-portal img.img-table-loading,
body.ih-client-portal .project-file-image {
  border: 1px solid #e2e7ee;
  border-radius: 10px;
  object-fit: cover;
}

body.ih-client-portal .row-options {
  color: #8b96a7;
  font-size: 11px;
  margin-top: 4px;
}

body.ih-client-portal .badge {
  background: #f9ece9;
  color: #81251d;
  font-weight: 750;
}

body.ih-client-portal .card,
body.ih-client-portal .list-group,
body.ih-client-portal .thumbnail {
  background: #ffffff;
  border: 1px solid #e2e7ee;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(24, 34, 51, 0.035), 0 8px 24px rgba(24, 34, 51, 0.045);
}

body.ih-client-portal .card-header,
body.ih-client-portal .list-group-item {
  background: #ffffff;
  border-color: #e2e7ee;
  color: #293448;
}

body.ih-client-portal .page-header,
body.ih-client-portal .breadcrumb {
  background: transparent;
  border-color: #e2e7ee;
  color: #68758a;
}

body.ih-client-portal .dataTables_empty,
body.ih-client-portal .no-results,
body.ih-client-portal .empty-state {
  color: #8b96a7 !important;
  padding: 42px 20px !important;
  text-align: center;
}

/* Products client catalog */
body.customers .ih-products-catalog {
  color: #293448;
  margin-bottom: 36px;
}

body.customers .ih-products-catalog__hero {
  align-items: center;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.98), rgba(251, 245, 244, 0.94)),
    url("../images/ironhand-hand-mark-v1.png") right -45px center / 230px auto no-repeat;
  border: 1px solid #e2e7ee;
  border-radius: 20px;
  box-shadow: 0 18px 52px rgba(24, 34, 51, 0.075);
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  min-height: 130px;
  overflow: hidden;
  padding: 26px 30px;
  position: relative;
}

body.customers .ih-products-catalog__hero::after {
  border: 1px solid rgba(169, 50, 38, 0.12);
  border-radius: 50%;
  content: "";
  height: 210px;
  pointer-events: none;
  position: absolute;
  right: 55px;
  top: -92px;
  width: 210px;
}

body.customers .ih-products-catalog__hero > div,
body.customers .ih-products-catalog__hero .btn {
  position: relative;
  z-index: 1;
}

body.customers .ih-products-catalog__hero span {
  color: #8f2b22;
  font-size: 9px !important;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

body.customers .ih-products-catalog__hero h1 {
  color: #111827;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 780;
  margin: 5px 0 0;
}

body.customers .ih-products-toolbar {
  background: #ffffff;
  border: 1px solid #e2e7ee;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(24, 34, 51, 0.045);
  margin-bottom: 20px;
  padding: 18px;
}

body.customers .ih-products-toolbar .form-group {
  margin: 0;
}

body.customers .ih-products-toolbar .bootstrap-select > .dropdown-toggle {
  background: #f8fafc !important;
  border-color: #d3dbe6 !important;
  min-height: 44px;
}

body.customers .ih-products-checkout,
body.customers .ih-products-grid .btn-warning,
body.customers .section-products .btn-success,
body.customers .apply_coupon.btn-success {
  background: linear-gradient(110deg, #81251d, #a93226 65%, #bd463a) !important;
  border-color: #a93226 !important;
  box-shadow: 0 10px 24px rgba(129, 37, 29, 0.18) !important;
  color: #ffffff !important;
}

body.customers .ih-products-results {
  margin: 0;
}

body.customers .ih-products-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

body.customers .ih-products-grid .product-row {
  float: none;
  padding: 0;
  width: auto;
}

body.customers .ih-products-grid .thumbnail.shadow {
  background: #ffffff;
  border: 1px solid #e2e7ee;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(24, 34, 51, 0.035), 0 18px 45px rgba(24, 34, 51, 0.065);
  height: 100%;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body.customers .ih-products-grid .thumbnail.shadow:hover {
  border-color: #d3dbe6;
  box-shadow: 0 24px 58px rgba(24, 34, 51, 0.11);
  transform: translateY(-3px);
}

body.customers .ih-products-grid .img1 {
  background: linear-gradient(145deg, #ffffff, #f7f9fc);
  border: 1px solid #edf0f4;
  border-radius: 13px;
  height: 245px;
  min-height: 245px;
  object-fit: contain;
  padding: 12px;
}

body.customers .ih-products-grid .title h4 {
  color: #111827;
  font-size: 19px;
  font-weight: 760;
  margin: 14px 0 8px;
}

body.customers .ih-products-grid .description {
  color: #68758a;
  height: 48px;
  line-height: 1.55;
  overflow: hidden;
}

body.customers .ih-products-grid .description span,
body.customers .ih-products-grid .description center {
  font-size: 13px !important;
}

body.customers .ih-products-grid .rates {
  border-top: 1px solid #edf0f4;
  margin-top: 14px;
  padding-top: 14px;
}

body.customers .ih-products-grid .rates h4 {
  color: #111827;
  font-size: 18px;
  font-weight: 760;
}

body.customers .ih-products-grid .product-row.without-variations .row.input_data {
  margin-top: 22px;
}

body.customers .ih-products-grid .row.input_data {
  align-items: center;
  display: flex;
}

body.customers .ih-products-grid .row.input_data .btn,
body.customers .ih-products-grid .row.input_data .form-control {
  min-height: 42px;
  width: 100%;
}

/* Public affiliate enrollment */
body.customers .ih-affiliate-landing {
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

body.customers .ih-affiliate-landing .jumbotron {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.97), rgba(250, 240, 238, 0.92)),
    url("../images/ironhand-hand-mark-v1.png") right 4% center / 245px auto no-repeat;
  border: 1px solid #e2e7ee;
  border-radius: 20px;
  box-shadow: 0 22px 65px rgba(24, 34, 51, 0.09);
  margin-bottom: 24px;
  overflow: hidden;
  padding: 54px 30px;
  position: relative;
}

body.customers .ih-affiliate-landing .jumbotron h1 {
  color: #111827;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 780;
  letter-spacing: -0.055em;
}

body.customers .ih-affiliate-landing .jumbotron p {
  color: #68758a;
}

body.customers .ih-affiliate-landing #referral {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

body.customers .ih-affiliate-landing #referral::before,
body.customers .ih-affiliate-landing #referral::after {
  content: none;
  display: none;
}

body.customers .ih-affiliate-landing #referral > div {
  background: #ffffff;
  border: 1px solid #e2e7ee;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(24, 34, 51, 0.05);
  padding: 24px;
  width: auto;
}

body.customers .ih-affiliate-landing #referral h2 {
  color: #111827;
  font-size: 22px;
  font-weight: 750;
  margin: 0 0 14px;
}

body.customers .ih-affiliate-landing #referral p {
  color: #536176;
  line-height: 1.65;
}

/* Project flow responses added by WhatsBot */
body.ih-client-portal .ih-project-flow-responses .table-responsive {
  border: 1px solid #e3e8ef;
  border-radius: 15px;
  box-shadow: 0 8px 28px rgba(24, 34, 51, 0.05);
  overflow: hidden;
}

body.ih-client-portal .ih-project-flow-responses .table {
  margin-bottom: 0;
}

body.ih-client-portal .ih-flow-response-details dt {
  color: #111827;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin-top: 16px;
  text-transform: uppercase;
}

body.ih-client-portal .ih-flow-response-details dt:first-child {
  margin-top: 0;
}

body.ih-client-portal .ih-flow-response-details dd {
  color: #536176;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 767px) {
  body.ih-client-portal #contact_email_notifications,
  body.customers .ih-affiliate-landing #referral {
    grid-template-columns: 1fr;
  }

  body.customers .ih-products-catalog__hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 23px 20px;
  }

  body.customers .ih-products-catalog__hero .btn {
    width: 100%;
  }

  body.customers .ih-products-toolbar {
    padding: 14px;
  }

  body.customers .ih-products-grid {
    grid-template-columns: 1fr;
  }

  body.customers .ih-affiliate-landing .jumbotron {
    padding: 38px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.customers .ih-products-grid .thumbnail.shadow {
    transition: none;
  }
}
