/* HPW Service Products Frontend Styles */

.hpw-service-wrapper {
  margin: 2em 0;
  padding: 1.5em;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.hpw-service-header {
  margin-bottom: 0;
}

.hpw-service-title {
  font-size: 1.25em;
  margin: 0 0 0.25em;
  font-weight: 600;
  color: #333;
}

.hpw-service-description {
  margin: 0;
  color: #666;
  font-size: 0.95em;
}

.hpw-service-grid {
  display: grid;
  gap: 1.5em;
  margin-top: 1em;
}

.hpw-service-grid.grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.hpw-service-grid.list {
  grid-template-columns: 1fr;
}

/* Card Styles - Clean Horizontal Layout */
.hpw-service-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.hpw-service-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-color: #ccc;
}

.hpw-service-card.selected {
  border-color: #7f54b3;
  box-shadow: 0 0 0 2px rgba(127, 84, 179, 0.15);
}

.hpw-service-card-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 12px;
  gap: 12px;
}

/* Checkbox - Left */
.hpw-service-checkbox-wrap {
  flex: 0 0 36px;
  width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4px;
}

.hpw-service-select {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.hpw-service-checkbox {
  margin: 0;
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #7f54b3;
}

.hpw-service-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Image Section - Fixed Size */
.hpw-service-image {
  flex: 0 0 90px;
  width: 90px;
  height: 90px;
  min-height: 90px;
  background: #f5f5f5;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.hpw-service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hpw-service-image .hpw-service-stock-status {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

.hpw-service-image .out-of-stock {
  background: rgba(214, 54, 56, 0.85);
}

.hpw-service-image .on-backorder {
  background: rgba(240, 173, 78, 0.85);
}

/* Content Section - Right Side (Expands) */
.hpw-service-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hpw-service-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  flex-wrap: wrap;
}

.hpw-service-name {
  font-size: 1em;
  line-height: 1.3;
  font-weight: 600;
  color: #222;
}

.hpw-service-price {
  color: #7f54b3;
  font-weight: 600;
  font-size: 1.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.hpw-service-description {
  color: #666;
  font-size: 0.85em;
  margin: 4px 0 6px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Service Body / Addons Section - Slides down smoothly */
.hpw-service-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease,
    margin 0.3s ease;
  margin-top: 0;
}

.hpw-service-body.open {
  max-height: 2000px;
  opacity: 1;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

/* Service Addons */
.hpw-service-addons-container {
  margin-top: 0;
}

.hpw-addon-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hpw-addon-item {
  padding: 8px 12px;
  background: #f8f8f8;
  border-radius: 6px;
  border: 1px solid #eee;
}

.hpw-addon-section-title {
  font-size: 15px;
  margin: 0 0 4px 0;
  color: #333;
  font-weight: 500;
}

.hpw-addon-section-description {
  color: #666;
  font-size: 0.8em;
  margin: 0 0 4px 0;
}

.hpw-addon-field {
  margin-top: 4px;
}

.hpw-addon-field:first-child {
  margin-top: 0;
}

.hpw-addon-field label {
  display: block;
  margin-bottom: 2px;
  font-weight: 500;
  font-size: 0.85em;
}

.hpw-addon-field .required {
  color: #d63638;
  margin-left: 2px;
}

.hpw-addon-field input[type="text"],
.hpw-addon-field input[type="number"],
.hpw-addon-field input[type="email"],
.hpw-addon-field input[type="tel"],
.hpw-addon-field input[type="url"],
.hpw-addon-field select,
.hpw-addon-field textarea {
  width: 100%;
  max-width: 300px;
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85em;
  transition: border-color 0.2s;
}

.hpw-addon-field input:focus,
.hpw-addon-field select:focus,
.hpw-addon-field textarea:focus {
  border-color: #7f54b3;
  outline: none;
  box-shadow: 0 0 0 2px rgba(127, 84, 179, 0.1);
}

.hpw-addon-field textarea {
  min-height: 50px;
  resize: vertical;
}

.hpw-addon-field input[type="file"] {
  display: block;
  margin-top: 4px;
  max-width: 300px;
  padding-left: 0px !important;
}

.hpw-addon-field .description {
  color: #666;
  font-size: 0.75em;
  margin-top: 2px;
}

.hpw-addon-field-checkbox label,
.hpw-addon-field-radio label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-weight: normal;
  cursor: pointer;
}

.hpw-addon-field-checkbox input[type="checkbox"],
.hpw-addon-field-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hpw-addon-field .hpw-error {
  border-color: #d63638 !important;
}

.hpw-addon-field .hpw-error:focus {
  box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.1) !important;
}

/* Validation */
.hpw-validation-error {
  color: #d63638;
  font-size: 0.75em;
  margin-top: 2px;
  display: block;
}

.hpw-no-addons {
  color: #999;
  font-style: italic;
  font-size: 0.85em;
  margin: 0;
  padding: 4px 0;
}

/* Unavailable state */
.hpw-service-unavailable {
  margin-top: 4px;
}

.hpw-service-unavailable-text {
  font-size: 0.8em;
  color: #999;
  font-style: italic;
}

/* Selected state - highlight card */
.hpw-service-card.selected {
  border-color: #7f54b3;
  box-shadow: 0 0 0 2px rgba(127, 84, 179, 0.15);
}

.hpw-service-card.selected .hpw-service-checkbox {
  accent-color: #7f54b3;
}

/* Responsive */
@media (max-width: 1023px) {
  .hpw-service-grid.grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .hpw-service-wrapper {
    padding: 1em;
    margin: 1em 0;
  }

  .hpw-service-grid.grid {
    grid-template-columns: 1fr;
  }

  .hpw-service-card-inner {
    flex-wrap: wrap;
    padding: 10px;
    gap: 8px;
  }

  .hpw-service-checkbox-wrap {
    flex: 0 0 30px;
    width: 30px;
    min-height: 30px;
    padding-top: 0;
  }

  .hpw-service-image {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    min-height: 70px;
  }

  .hpw-service-content {
    flex: 1 1 100%;
    min-width: 0;
  }

  .hpw-service-heading {
    flex-wrap: wrap;
  }

  .hpw-service-price {
    font-size: 0.95em;
  }

  .hpw-addon-field input[type="text"],
  .hpw-addon-field input[type="number"],
  .hpw-addon-field select,
  .hpw-addon-field textarea {
    max-width: 100%;
  }
}

/* Loading states */
.hpw-service-addons-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
  min-height: 30px;
}

.hpw-service-addons-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #7f54b3;
  border-radius: 50%;
  animation: hpw-spin 0.8s linear infinite;
}

@keyframes hpw-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Make the entire card clickable with pointer cursor */
.hpw-service-card {
  cursor: pointer;
}

/* But keep interactive elements with default cursor */
.hpw-service-card .hpw-service-checkbox,
.hpw-service-card select,
.hpw-service-card input,
.hpw-service-card textarea,
.hpw-service-card button,
.hpw-service-card .hpw-service-toggle {
  cursor: default;
}

/* Hover effect for clickable card */
.hpw-service-card:not(.selected):hover {
  border-color: #7f54b3;
  background: #fafafa;
}

/* Selected state with hover */
.hpw-service-card.selected:hover {
  border-color: #7f54b3;
  box-shadow: 0 0 0 2px rgba(127, 84, 179, 0.2);
}
.hpw-standalone-wrapper {
  margin: 28px 0;
}
.hpw-standalone-service-card {
  margin: 0;
}
.hpw-standalone-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.hpw-standalone-actions input[type="number"] {
  width: 76px;
}
.hpw-standalone-notice {
  margin-top: 10px;
  font-size: 14px;
}
.hpw-standalone-notice.success {
  color: #157347;
}
.hpw-standalone-notice.error {
  color: #b42318;
}
.hpw-standalone-service-card .hpw-service-addons-container {
  margin-top: 14px;
}

/* Standalone cart/checkout services: preserve product-page card interaction */
.hpw-standalone-wrapper .hpw-standalone-service-card {
  margin: 0;
}
.hpw-standalone-wrapper .hpw-service-body[hidden] {
  display: none !important;
}
.hpw-standalone-wrapper .hpw-service-body {
  width: 100%;
  margin-top: 12px;
}
.hpw-standalone-wrapper .hpw-standalone-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.hpw-standalone-wrapper .hpw-standalone-quantity-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hpw-standalone-wrapper .hpw-standalone-qty {
  width: 84px;
}
.hpw-standalone-wrapper .hpw-add-service-button {
  margin: 0;
}
.hpw-standalone-wrapper .hpw-standalone-notice.success {
  color: #167a3f;
  margin-top: 10px;
}
.hpw-standalone-wrapper .hpw-standalone-notice.error {
  color: #b42318;
  margin-top: 10px;
}

/* ===== HPW 2026-07 cart/checkout interaction consistency fix ===== */
.hpw-standalone-wrapper .hpw-service-grid {
  gap: 16px;
}
.hpw-standalone-wrapper .hpw-standalone-service-card {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.hpw-standalone-wrapper .hpw-standalone-service-card:hover {
  border-color: #ccc;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.hpw-standalone-wrapper .hpw-standalone-service-card.selected,
.hpw-standalone-wrapper .hpw-standalone-service-card.is-expanded {
  border-color: #7f54b3;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(127, 84, 179, 0.15);
}
.hpw-standalone-wrapper .hpw-standalone-service-card .hpw-service-card-inner {
  width: 100%;
  box-sizing: border-box;
}
.hpw-standalone-wrapper .hpw-service-body {
  cursor: default;
}
.hpw-standalone-wrapper .hpw-service-body[hidden] {
  display: none !important;
}
.hpw-standalone-wrapper .hpw-service-body:not([hidden]) {
  display: block !important;
}

/* Standalone cart/checkout cards: identical base and selected appearance. */
.hpw-standalone-service-card {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.hpw-standalone-service-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.hpw-standalone-service-card.selected,
.hpw-standalone-service-card.is-expanded {
  border-color: #7c5ce7;
  box-shadow: 0 8px 22px rgba(80, 55, 170, 0.12);
}
body.hpw-flyout-open {
  overflow: hidden !important;
}
.hpw-standalone-wrapper .hpw-add-service-button.button.alt {
  background: var(--wp--preset--color--primary, #1473a8) !important;
  background-color: var(--wp--preset--color--primary, #1473a8) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.hpw-standalone-wrapper .hpw-add-service-button.button.alt:hover {
  filter: brightness(0.92);
}

/* ===== HPW v2.0.8 modern theme-aligned card design ===== */
.hpw-service-wrapper {
  --hpw-accent: #0d69a0;
  --hpw-accent-soft: rgba(13, 105, 160, 0.12);
  box-sizing: border-box;
  margin: 2em 0 0 0;
  padding: 1em 1.35em 1.35em 1.35em;
  background: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 10px 34px rgba(15, 34, 48, 0.09);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.hpw-service-wrapper *,
.hpw-service-wrapper *::before,
.hpw-service-wrapper *::after {
  box-sizing: border-box;
}

.hpw-service-wrapper button,
.hpw-service-wrapper input,
.hpw-service-wrapper select,
.hpw-service-wrapper textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.hpw-service-wrapper .hpw-service-title,
.hpw-service-wrapper .hpw-service-name,
.hpw-service-wrapper .hpw-addon-section-title {
  color: inherit;
  font-family: inherit;
}

.hpw-service-wrapper .hpw-service-description,
.hpw-service-wrapper .hpw-addon-section-description {
  color: inherit;
  opacity: 0.76;
}

.hpw-service-wrapper .hpw-service-grid {
  gap: 1em;
}

.hpw-service-wrapper .hpw-service-card,
.hpw-service-wrapper .hpw-standalone-service-card {
  background: #fff;
  border: 1px solid rgba(13, 105, 160, 0.24);
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(15, 34, 48, 0.055);
  overflow: hidden;
  transform: translateY(0);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.hpw-service-wrapper .hpw-service-card:not(.selected):hover,
.hpw-service-wrapper .hpw-standalone-service-card:hover {
  background: #fff;
  border-color: rgba(13, 105, 160, 0.55);
  box-shadow: 0 8px 22px rgba(15, 34, 48, 0.09);
  transform: translateY(-1px);
}

.hpw-service-wrapper .hpw-service-card.selected,
.hpw-service-wrapper .hpw-service-card.selected:hover,
.hpw-service-wrapper .hpw-standalone-service-card.selected,
.hpw-service-wrapper .hpw-standalone-service-card.is-expanded {
  background: #fff;
  border-color: var(--hpw-accent);
  box-shadow:
    0 0 0 2px var(--hpw-accent-soft),
    0 8px 24px rgba(13, 105, 160, 0.11);
}

.hpw-service-wrapper .hpw-service-card-inner {
  padding: 10px;
  gap: 12px;
}

/* On desktop, center the checkbox against the compact 72px thumbnail without
 * vertically shifting the service heading, description, or expanded fields. */
@media (min-width: 1025px) {
  .hpw-service-wrapper .hpw-service-image {
    flex-basis: 55px;
    width: 55px;
    height: 55px;
    min-height: 55px;
  }

  .hpw-service-wrapper
    .hpw-service-card-inner.hpw-has-image
    > .hpw-service-checkbox-wrap {
    height: 55px;
    min-height: 55px;
    padding-top: 0;
  }
}

.hpw-service-wrapper .hpw-service-checkbox,
.hpw-service-wrapper .hpw-addon-field input[type="checkbox"],
.hpw-service-wrapper .hpw-addon-field input[type="radio"] {
  accent-color: var(--hpw-accent) !important;
}

.hpw-service-wrapper .hpw-service-checkbox:focus-visible,
.hpw-service-wrapper .hpw-addon-field input[type="checkbox"]:focus-visible,
.hpw-service-wrapper .hpw-addon-field input[type="radio"]:focus-visible {
  outline: 3px solid var(--hpw-accent-soft);
  outline-offset: 3px;
}

.hpw-service-wrapper .hpw-service-image {
  background: transparent;
  /* border: 1px solid rgba(13, 105, 160, 0.24); */
  border-radius: 10px;
}

.hpw-service-wrapper .hpw-service-price {
  color: #222 !important;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.hpw-service-wrapper .hpw-service-price del,
.hpw-service-wrapper .hpw-service-price ins {
  color: inherit !important;
  font: inherit;
}

.hpw-service-wrapper .hpw-service-name {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.hpw-service-wrapper .hpw-service-description {
  color: #333;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  opacity: 1;
}

.hpw-service-wrapper .hpw-service-description > :first-child {
  margin-top: 0;
}

.hpw-service-wrapper .hpw-service-description > :last-child {
  margin-bottom: 0;
}

/* Keep WooCommerce currency symbols and numeric values typographically equal
 * everywhere a service or service add-on price is rendered by this plugin. */
.hpw-service-wrapper .woocommerce-Price-amount,
.hpw-service-wrapper .woocommerce-Price-amount bdi,
.hpw-service-wrapper
  .woocommerce-Price-amount
  .woocommerce-Price-currencySymbol,
.hpw-service-wrapper .amount,
.hpw-service-wrapper .amount bdi,
.hpw-service-wrapper .amount .woocommerce-Price-currencySymbol {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  vertical-align: baseline !important;
}

.hpw-service-wrapper .hpw-service-addons-loading::after {
  border-top-color: var(--hpw-accent);
}

/* Attribute groups stay open; only their actual form controls keep a boundary. */
.hpw-service-wrapper .hpw-service-body.open {
  border-top: 0;
}

.hpw-service-wrapper .hpw-addon-fields {
  gap: 14px;
}

.hpw-service-wrapper .hpw-addon-item {
  padding: 0 0 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hpw-service-wrapper .hpw-addon-item:last-child {
  padding-bottom: 0;
}

.hpw-service-wrapper .hpw-addon-field input[type="text"],
.hpw-service-wrapper .hpw-addon-field input[type="number"],
.hpw-service-wrapper .hpw-addon-field input[type="email"],
.hpw-service-wrapper .hpw-addon-field input[type="tel"],
.hpw-service-wrapper .hpw-addon-field input[type="url"],
.hpw-service-wrapper .hpw-addon-field select,
.hpw-service-wrapper .hpw-addon-field textarea,
.hpw-service-wrapper .hpw-standalone-qty {
  background: #fff;
  border: 1px solid rgba(13, 105, 160, 0.28);
  border-radius: 8px;
}

.hpw-service-wrapper .hpw-addon-field input:focus,
.hpw-service-wrapper .hpw-addon-field select:focus,
.hpw-service-wrapper .hpw-addon-field textarea:focus,
.hpw-service-wrapper .hpw-standalone-qty:focus {
  border-color: var(--hpw-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--hpw-accent-soft);
}

.hpw-service-wrapper .hpw-standalone-notice {
  font-size: 0.9em;
}

.hpw-service-wrapper .hpw-add-service-button.button.alt {
  background: var(--hpw-accent) !important;
  background-color: var(--hpw-accent) !important;
  border-color: var(--hpw-accent) !important;
  border-radius: 9px;
  font-family: inherit;
}

@media (max-width: 768px) {
  .hpw-service-wrapper {
    padding: 1em;
    border-radius: 14px;
  }

  .hpw-service-wrapper .hpw-service-card-inner {
    padding: 12px;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hpw-service-wrapper .hpw-service-card,
  .hpw-service-wrapper .hpw-standalone-service-card {
    transition: none;
  }
}

/* ===== HPW v2.0.13 cart service quantity control ===== */
.hpw-standalone-wrapper[data-context="cart"] .hpw-service-intro {
  max-width: 68ch;
  margin: 0.45em 0 0;
  color: inherit;
  font-family: inherit;
  font-size: 0.95em;
  line-height: 1.55;
  opacity: 0.76;
}

.hpw-standalone-wrapper[data-context="cart"] .hpw-standalone-quantity-label {
  width: max-content;
  gap: 6px;
}

.hpw-standalone-wrapper[data-context="cart"] .hpw-standalone-quantity-text {
  color: #000;
  font-family: inherit;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.3;
}

.hpw-standalone-wrapper[data-context="cart"] .hpw-standalone-quantity-control {
  display: grid;
  grid-template-columns: 32px minmax(42px, 1fr) 32px;
  align-items: center;
  width: 118px;
  max-width: 100%;
  min-height: 38px;
  padding: 2px;
  background: #f6f8fb;
  border: 1px solid rgba(13, 105, 160, 0.18);
  border-radius: 999px;
}

.hpw-standalone-wrapper[data-context="cart"] .hpw-standalone-qty-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: #fff !important;
  border: 0 !important;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(15, 34, 48, 0.035);
  color: #111827 !important;
  cursor: pointer !important;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition:
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.hpw-standalone-wrapper[data-context="cart"] .hpw-standalone-qty-button:hover,
.hpw-standalone-wrapper[data-context="cart"]
  .hpw-standalone-qty-button:focus-visible {
  color: var(--hpw-accent) !important;
  box-shadow: 0 3px 12px rgba(13, 105, 160, 0.14);
  outline: 0;
  transform: translateY(-1px);
}

.hpw-standalone-wrapper[data-context="cart"]
  .hpw-standalone-qty-button:disabled {
  cursor: not-allowed !important;
  opacity: 0.38;
  transform: none;
}

.hpw-standalone-wrapper[data-context="cart"] input.hpw-standalone-qty {
  width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0 0.25rem;
  padding-left: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  color: #000 !important;
  font-family: inherit;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  -moz-appearance: textfield;
}

.hpw-standalone-wrapper[data-context="cart"]
  input.hpw-standalone-qty::-webkit-inner-spin-button,
.hpw-standalone-wrapper[data-context="cart"]
  input.hpw-standalone-qty::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.hpw-standalone-wrapper[data-context="cart"]
  .hpw-add-service-button.button.alt {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 190px;
  max-width: 100%;
  min-height: 44px;
  height: 44px;
  margin: 0;
  padding: 0 22px !important;
  font-size: 0.95em;
  line-height: 1.2;
}

@media (max-width: 480px) {
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-quantity-control {
    grid-template-columns: 32px minmax(42px, 1fr) 32px;
    width: 118px;
    min-height: 38px;
  }

  .hpw-standalone-wrapper[data-context="cart"] .hpw-standalone-qty-button {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-add-service-button.button.alt {
    min-width: 170px;
    min-height: 40px;
    height: 40px;
  }
}

/* ===== HPW v2.0.15 tablet/mobile two-row service cards ===== */
@media (max-width: 1024px) {
  .hpw-service-wrapper .hpw-service-card-inner {
    display: grid;
    grid-template-columns: 55px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: start;
    column-gap: 12px;
    row-gap: 8px;
  }

  .hpw-service-wrapper .hpw-service-checkbox-wrap {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-content: center;
    width: 55px;
    height: 30px;
    min-height: 30px;
    padding: 0;
  }

  .hpw-service-wrapper .hpw-service-select {
    justify-content: left;
    padding-left: 8px;
  }

  .hpw-service-wrapper .hpw-service-content {
    display: contents;
  }

  .hpw-service-wrapper .hpw-service-heading {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .hpw-service-wrapper .hpw-service-name {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .hpw-service-wrapper .hpw-service-price {
    margin-left: auto;
  }

  .hpw-service-wrapper .hpw-service-image {
    grid-column: 1;
    grid-row: 2;
    width: 55px;
    height: 55px;
    min-height: 55px;
    border: 1px solid rgba(13, 105, 160, 0.24);
  }

  .hpw-service-wrapper .hpw-service-description {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    min-width: 0;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hpw-service-wrapper .hpw-service-body {
    grid-column: 1 / -1;
    grid-row: 3;
    min-width: 0;
  }

  .hpw-service-wrapper
    .hpw-service-card-inner.hpw-no-image
    .hpw-service-description {
    grid-column: 1 / -1;
  }

  .hpw-service-wrapper
    .hpw-service-card-inner.hpw-no-image
    .hpw-service-heading {
    grid-column: 2;
  }
}

@media (max-width: 480px) {
  .hpw-service-wrapper .hpw-service-card-inner {
    grid-template-columns: 55px minmax(0, 1fr);
    column-gap: 10px;
  }

  .hpw-service-wrapper .hpw-service-checkbox-wrap {
    width: 55px;
  }

  .hpw-service-wrapper .hpw-service-image {
    width: 55px;
    height: 55px;
    min-height: 55px;
  }
}

/* Final price normalization: WooCommerce and theme styles often target the
 * nested amount, bdi, and currency symbol more specifically than the card.
 * Keep every visible part of a service price typographically identical. */
body .hpw-service-wrapper .hpw-service-card span.hpw-service-price,
body .hpw-service-wrapper .hpw-service-card span.hpw-service-price del,
body .hpw-service-wrapper .hpw-service-card span.hpw-service-price ins,
body .hpw-service-wrapper .hpw-service-card span.hpw-service-price .amount,
body
  .hpw-service-wrapper
  .hpw-service-card
  span.hpw-service-price
  .woocommerce-Price-amount,
body .hpw-service-wrapper .hpw-service-card span.hpw-service-price bdi,
body
  .hpw-service-wrapper
  .hpw-service-card
  span.hpw-service-price
  .woocommerce-Price-currencySymbol {
  color: #222 !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  vertical-align: baseline !important;
}

/* Product-page and cart Additional Services follow the compact Purchase
 * Options pattern on tablet/mobile: checkbox, icon, and content sit side-by-side. */
@media (max-width: 1024px) {
  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-card-inner.hpw-has-image,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-card-inner.hpw-has-image {
    grid-template-columns: 35px 60px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    align-items: start;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-checkbox-wrap,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-checkbox-wrap {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    width: 55px;
    height: 55px;
    min-height: 55px;
    padding: 0;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-image,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-image {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 55px;
    height: 55px;
    min-height: 55px;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-heading,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-heading {
    grid-column: 3;
    grid-row: 1;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-description,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-description {
    grid-column: 3;
    grid-row: 2;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-body,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-body {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 480px) {
  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-card-inner.hpw-has-image,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-card-inner.hpw-has-image {
    grid-template-columns: 48px 55px minmax(0, 1fr);
    column-gap: 10px;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-checkbox-wrap,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-checkbox-wrap {
    width: 48px;
  }
}

/* Compact phones: remove the decorative service icon and keep product-page
 * and cart Additional Service cards on the same two-column structure. This
 * block intentionally follows the wider responsive rules so it wins at
 * mobile widths up to and including 560px. */
@media (max-width: 560px) {
  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-card-inner.hpw-has-image,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-card-inner.hpw-has-image {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 10px;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-image,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-image {
    display: none;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-checkbox-wrap,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-checkbox-wrap {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: stretch;
    width: 28px;
    height: auto;
    min-height: 55px;
    padding: 0;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-select,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-select {
    align-items: center;
    justify-content: center;
    padding-left: 0;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-heading,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-heading {
    grid-column: 2;
    grid-row: 1;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-description,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-description {
    grid-column: 2;
    grid-row: 2;
  }

  .hpw-service-wrapper:not(.hpw-standalone-wrapper)
    .hpw-service-card
    .hpw-service-body,
  .hpw-standalone-wrapper[data-context="cart"]
    .hpw-standalone-service-card
    .hpw-service-body {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}
