/* Product Description Spacing Fix */

/* Fix for the tab content to properly format paragraphs */
.tab-inner-content {
  white-space: normal !important; /* Change from pre-line to normal */
  word-wrap: break-word;
  line-height: 1.6 !important;
  color: var(--body-color);
  font-size: 16px !important;
  min-height: auto !important; /* Remove minimum height */
  height: auto !important; /* Allow content to determine height */
  padding: 15px !important; /* Add padding for better readability */
  overflow: auto; /* Handle overflow properly */
  width: 100% !important;
  box-sizing: border-box;
}

/* Add proper paragraph spacing */
.tab-inner-content p {
  margin-bottom: 1rem !important; /* Add space between paragraphs */
  line-height: 1.6 !important;
  width: 100% !important;
}

/* Handle the last paragraph to avoid extra bottom margin */
.tab-inner-content p:last-child {
  margin-bottom: 0 !important;
}

/* Ensure proper line breaks */
.tab-inner-content br {
  display: block !important;
  content: "" !important;
  margin-top: 0.5rem !important;
}

/* Enhanced RTL functionality with proper spacing */
.tab-inner-content.rtl {
  direction: rtl !important;
  text-align: right !important;
  white-space: normal !important;
  line-height: 1.6 !important;
}

.tab-inner-content.rtl p {
  direction: rtl !important;
  text-align: right !important;
  margin-bottom: 1rem !important;
  line-height: 1.6 !important;
}

/* Fix for RTL line breaks */
.tab-inner-content.rtl br {
  display: block !important;
  content: "" !important;
  margin-top: 0.5rem !important;
}

/* Fix for bullet points and lists */
.tab-inner-content ul, 
.tab-inner-content ol {
  padding-left: 1.5rem !important;
  margin-bottom: 1rem !important;
  width: 100% !important;
  box-sizing: border-box;
}

.tab-inner-content.rtl ul, 
.tab-inner-content.rtl ol {
  padding-right: 1.5rem !important;
  padding-left: 0 !important;
  margin-bottom: 1rem !important;
}

.tab-inner-content li {
  margin-bottom: 0.5rem !important;
}

.tab-inner-content.rtl li {
  text-align: right !important;
}

/* Fix for headings in description */
.tab-inner-content h1,
.tab-inner-content h2,
.tab-inner-content h3,
.tab-inner-content h4,
.tab-inner-content h5,
.tab-inner-content h6 {
  margin-top: 1.5rem !important;
  margin-bottom: 1rem !important;
  font-weight: 600;
  line-height: 1.4;
  width: 100% !important;
}

.tab-inner-content h1:first-child,
.tab-inner-content h2:first-child,
.tab-inner-content h3:first-child,
.tab-inner-content h4:first-child,
.tab-inner-content h5:first-child,
.tab-inner-content h6:first-child {
  margin-top: 0 !important;
}

/* RTL headings */
.tab-inner-content.rtl h1,
.tab-inner-content.rtl h2,
.tab-inner-content.rtl h3,
.tab-inner-content.rtl h4,
.tab-inner-content.rtl h5,
.tab-inner-content.rtl h6 {
  text-align: right !important;
}

/* Short description styling - with RTL support */
.product-short-description {
  white-space: normal !important;
  line-height: 1.6 !important;
  color: var(--body-color) !important;
  font-size: 1rem !important;
  width: 100% !important;
  padding: 0 !important;
  margin-bottom: 1.5rem !important;
}

.product-short-description p {
  margin-bottom: 0.75rem !important;
  line-height: 1.6 !important;
}

.product-short-description p:last-child {
  margin-bottom: 0 !important;
}

/* RTL Short description - override the default LTR settings */
.product-short-description.rtl {
  direction: rtl !important;
  text-align: right !important;
  white-space: normal !important;
}

.product-short-description.rtl p {
  direction: rtl !important;
  text-align: right !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.6 !important;
}

/* Fix for RTL line breaks in short description */
.product-short-description.rtl br {
  display: block !important;
  content: "" !important;
  margin-top: 0.5rem !important;
}

/* Product tab content container */
.product-tab-content-container {
  width: 100% !important;
  box-sizing: border-box;
  border: 1px solid #e9ecef;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.product-tab-content {
  display: none;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
  height: auto !important;
  min-height: auto !important;
}

.product-tab-content.active {
  display: block;
  width: 100% !important;
  height: auto !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tab-inner-content {
    font-size: 15px !important;
    line-height: 1.5 !important;
    padding: 10px !important;
  }
  
  .tab-inner-content p {
    margin-bottom: 0.8rem !important;
  }
  
  .tab-inner-content br {
    margin-top: 0.4rem !important;
  }
  
  .tab-inner-content.rtl {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }
  
  .tab-inner-content.rtl p {
    margin-bottom: 0.8rem !important;
  }
  
  .tab-inner-content.rtl br {
    margin-top: 0.4rem !important;
  }
  
  .product-short-description {
    font-size: 15px !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    width: 100% !important;
    display: block !important;
  }
  
  .product-short-description p {
    margin-bottom: 0.6rem !important;
    width: 100% !important;
    display: block !important;
  }
  
  .meta-row {
    flex-direction: column !important;
    width: 100% !important;
  }
  
  .meta-value {
    width: 100% !important;
    display: block !important;
  }
  
  .product-short-description.rtl {
    font-size: 15px !important;
    line-height: 1.5 !important;
    text-align: right !important;
    width: 100% !important;
    display: block !important;
  }
  
  .product-short-description.rtl p {
    margin-bottom: 0.6rem !important;
    text-align: right !important;
    width: 100% !important;
    display: block !important;
  }
} 