/**
 * ATTPPF Hide Native Customization Text Labels
 * =============================================
 *
 * This CSS file hides specific text labels in the native PrestaShop
 * customization section without affecting the functionality.
 *
 * SUPPORTS:
 * - Hummingbird Theme (default PrestaShop 9)
 * - Akira Theme
 *
 * Based on actual HTML structure:
 * - "Product customization" heading (h4)
 * - "Type your text here" card header
 * - "Your customization:" paragraph with h6 class
 * - "Nu uita sa salvezi..." instructional text (Akira)
 * - Label elements (Placeholder, etc.)
 * - Character count (1024 char. max)
 *
 * Everything else (textarea, button, character count) remains visible.
 */

/* ========================================
   HUMMINGBIRD THEME SELECTORS
   ======================================== */

/* Hide main "Product customization" heading */
.product-customization > h4,
.js-product-customization > h4 {
    display: none !important;
}

/* Hide "Type your text here" card header - EXACT match from HTML */
.product-customization .product-customization__item .card-header.bg-transparent.fw-bold.border-1,
.js-product-customization .product-customization__item .card-header.bg-transparent.fw-bold.border-1,
.product-customization .card-header.bg-transparent.fw-bold,
.js-product-customization .card-header.bg-transparent.fw-bold {
    display: none !important;
}

/* Hide "Your customization:" paragraph with h6 class - EXACT match from HTML */
.product-customization .product-customization__message.h6,
.js-product-customization .product-customization__message.h6,
.product-customization p.h6.product-customization__message,
.js-product-customization p.h6.product-customization__message {
    display: none !important;
}

/* Alternative selectors for the customization message */
.product-customization .card-body .mt-3 > p.h6:first-child,
.js-product-customization .card-body .mt-3 > p.h6:first-child {
    display: none !important;
}

/* CRITICAL FIX: Make ATTPPF selections display VERTICALLY instead of horizontal line */
.product-customization .card-body .mt-3 > p.mb-0,
.js-product-customization .card-body .mt-3 > p.mb-0,
.product-customization .card-body p.mb-0,
.js-product-customization .card-body p.mb-0,
body .product-customization .card-body .mt-3 > p.mb-0,
body .js-product-customization .card-body .mt-3 > p.mb-0 {
    white-space: pre-line !important;
    line-height: 1.8 !important;
    font-size: 14px !important;
    margin-bottom: 1rem !important;
    display: block !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}
/* white space fix */
.card {
    border:medium none !important;
    background:none;
  }
  .fw-bold.d-block.mb-2 {
    display: none !important;
  }

  .product-customization .card-body .mt-3, .js-product-customization .card-body .mt-3 {
    white-space: nowrap !important;
    margin-top: 1rem !important;
  }
/* Force line breaks at specific text patterns for ATTPPF selections */
.product-customization .card-body p:not(.h6),
.js-product-customization .card-body p:not(.h6) {
    white-space: -moz-pre-wrap !important;
    white-space: -pre-wrap !important;
    white-space: -o-pre-wrap !important;
    word-wrap: break-word !important;
}

/* Specific targeting for the ATTPPF selection text display */
.product-customization .card-body .mt-3,
.js-product-customization .card-body .mt-3 {
    white-space: pre-line;
}

/* Force vertical display using CSS content manipulation for common ATTPPF patterns */
.product-customization p[style*=""],
.js-product-customization p[style*=""] {
    white-space: pre-line !important;
}

/* Hide card footer with character count and "Optional" text */
.product-customization .product-customization__item .card-footer.bg-transparent.border-1,
.js-product-customization .product-customization__item .card-footer.bg-transparent.border-1,
.product-customization .card-footer.bg-transparent.border-1,
.js-product-customization .card-footer.bg-transparent.border-1 {
    display: none !important;
}

/* Ensure essential elements remain visible and functional */
.product-customization textarea,
.product-customization button,
.product-customization input[type="submit"],
.product-customization .form-control,
.js-product-customization textarea,
.js-product-customization button,
.js-product-customization input[type="submit"],
.js-product-customization .form-control {
    display: block !important;
    visibility: visible !important;
}

/* Adjust card body padding when header is hidden */
.product-customization .product-customization__item .card-body,
.js-product-customization .product-customization__item .card-body {
    padding-top: 1.5rem !important;
}

/* Ensure the card structure remains clean when headers are hidden */
.product-customization .product-customization__item,
.js-product-customization .product-customization__item {
    border: 1px solid #dee2e6 !important;
}

/* Make sure buttons are properly styled and accessible */
.product-customization button[name="submitCustomizedData"],
.js-product-customization button[name="submitCustomizedData"] {
    display: inline-block !important;
    visibility: visible !important;
    margin-top: 1rem !important;
}

/* ========================================
   AKIRA THEME SELECTORS
   ======================================== */

/* Hide instructional text: "Nu uita sa salvezi personalizarea pentru a putea adauga in cos" */
.product-customization-form .text-muted,
.product-customization-form p.text-muted,
.product-customization .text-muted:not(.attppf-price),
.product-customization-wrapper .text-muted,
#product-customization-form .text-muted,
.customization-section .text-muted {
    display: none !important;
}

/* Hide label elements for native customization fields (Placeholder, etc.) */
.product-customization-form label.form-control-label,
.product-customization label.form-control-label,
.product-customization-form label.col-form-label,
.product-customization label[for^="field-"],
#product-customization-form label.form-control-label,
.customization-section label.form-control-label {
    display: none !important;
}

/* Hide character count: "1024 char. max" */
.product-customization-form small.float-xs-right,
.product-customization-form small.float-end,
.product-customization small.float-xs-right,
.product-customization small.float-end,
.product-customization-form .char-counter,
.product-customization .char-counter,
#product-customization-form small {
    display: none !important;
}

/* Alternative selectors for Akira theme customization section */
.product-add-to-cart .product-customization-form .form-group > label,
.product-add-to-cart .customization-section .form-group > label,
section.product-customization .form-control-label,
section.product-customization label[class*="col-"],
.product-information .product-customization-form label {
    display: none !important;
}

/* Hide any remaining visible text hints in Akira */
.product-customization-form > p:first-of-type,
.customization-section > p:first-of-type,
#product-customization-form > p:first-of-type {
    display: none !important;
}

/* Ensure ATTPPF elements remain visible in Akira */
.product-customization-form .attppf-root,
.product-customization-form .attppf-fo-form,
.product-customization .attppf-root,
.product-customization .attppf-fo-form,
.attppf-root label,
.attppf-fo-form label,
.attppf-root .text-muted,
.attppf-fo-form .text-muted {
    display: block !important;
    visibility: visible !important;
}

/* Keep textarea and submit button visible in Akira */
.product-customization-form textarea,
.product-customization-form button[type="submit"],
.product-customization-form .btn-primary,
#product-customization-form textarea,
#product-customization-form button {
    display: block !important;
    visibility: visible !important;
}

/* Clean up spacing after hidden elements in Akira */
.product-customization-form .form-group,
.customization-section .form-group,
#product-customization-form .form-group {
    margin-bottom: 1rem !important;
}

/* ========================================
   CART SIDEBAR / CART PAGE - HIDE PLACEHOLDER TEXT
   ======================================== */

/* HIDE ENTIRE CUSTOMIZATIONS SECTION IN CART SIDEBAR */
#canvas-mini-cart .customizations,
.widget_shopping_cart .customizations,
.cart-item-product .customizations,
#blockcart-modal .customizations,
.blockcart .customizations {
    display: none !important;
}

/* Also hide in regular cart page if needed */
.cart-detailed .customizations,
.cart-grid-body .customizations,
.checkout-cart .customizations {
    display: none !important;
}

/* CRITICAL: The HTML uses "lable" (misspelled) not "label" */
/* Hide "Placeholder:" label text in cart sidebar and cart page */
.customizations .lable,
.cart-item-product .customizations .lable,
.customizations li .lable,
div.customizations span.lable,
.widget_shopping_cart .customizations .lable,
#canvas-mini-cart .customizations .lable,
.blockcart .customizations .lable {
    display: none !important;
}

/* Also hide the old "label" class just in case */
.customizations .label,
.cart-item-product .customizations .label,
.customizations li .label,
div.customizations span.label {
    display: none !important;
}

/* Hide empty list items that only contain ":" */
.customizations li:has(.lable:empty),
.customizations li:has(.text:empty) {
    display: none !important;
}

/* Alternative: Target by content */
.cart-item .product-line-info small.lable,
.cart-detailed .product-line-info small.lable,
.blockcart-product .customization-item .lable,
.product-line-customizations .lable,
.cart-grid-body .lable,
.checkout-cart .lable {
    display: none !important;
}

/* Target PrestaShop's default customization display structure in cart */
.product-line-info .customization small.lable,
.product-line-info .product-customization-line .lable,
.cart-overview .customization small.lable,
#blockcart-modal .customization small.lable {
    /* Hide lable text like "Placeholder:" */
    display: none !important;
}

/* Keep the value visible */
.product-line-info .customization small.value,
.product-line-info .product-customization-line small:not(.lable),
.cart-overview .customization small.value,
#blockcart-modal .customization small.value,
.customizations .text {
    display: inline !important;
    font-size: 13px !important;
}

/* More specific: Hide customization labels in modal cart */
#blockcart-modal .customization-item .lable,
#blockcart-modal .product-customization-line .lable,
.modal-body .customization-item .lable,
.modal-body .product-customization-line .lable {
    display: none !important;
}

/* Akira specific cart sidebar */
.cart-detailed-product-line .customization small.lable,
.cart-summary-product-line .customization small.lable,
.product-line-info .customization .lable {
    display: none !important;
}

/* Hide just the "Placeholder:" prefix - targets the misspelled class */
.product-line-info div[class*="customization"] span.lable,
.cart-grid-body div[class*="customization"] span.lable,
#blockcart-modal div[class*="customization"] span.lable,
#canvas-mini-cart div.customizations span.lable {
    display: none !important;
}

/* Ensure text values remain visible */
.product-line-info div[class*="customization"] span.text,
.cart-grid-body div[class*="customization"] span.text,
#blockcart-modal div[class*="customization"] span.text,
#canvas-mini-cart div.customizations span.text {
    display: inline !important;
    font-size: 13px !important;
}



