/*
 Theme Name:   Salient Child
 Theme URI:    https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
 Description:  Salient Child Theme for Haddaf Custom
 Author:       Haddaf
 Author URI:   #
 Template:     salient
 Version:      1.0.0
 License:      Custom license
 Text Domain:  salient-child
*/

/* Add your custom CSS below this line */

/* Fix Arabic (RTL) off-canvas menu alignment issue in Salient */
html[lang="ar"] body[dir="rtl"] #slide-out-widget-area,
html[lang="ar"] #slide-out-widget-area {
  direction: rtl !important;
  text-align: right !important;
  padding-right: 25px !important;
  padding-left: 15px !important;
  overflow-x: hidden !important; /* prevent words from going off-screen */
}

/* Ensure each menu link aligns properly */
html[lang="ar"] #slide-out-widget-area .menu a,
html[lang="ar"] #slide-out-widget-area .widget_nav_menu a {
  direction: rtl !important;
  text-align: right !important;
  display: block !important;
  padding-right: 20px !important;
  padding-left: 0 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

/* Optional: align icons (like social icons) to the right on Arabic */
html[lang="ar"] #slide-out-widget-area .nectar-social,
html[lang="ar"] #slide-out-widget-area .social-icons {
  text-align: right !important;
  margin-right: 20px !important;
  margin-left: 0 !important;
}

/* Optional: if the whole off-canvas slides from the wrong side */
html[lang="ar"] #slide-out-widget-area {
  right: 0 !important;
  left: auto !important;
}

/* Fix underline (active page indicator) for Arabic RTL in off-canvas menu */
html[lang="ar"] #slide-out-widget-area .menu li.current-menu-item > a:after,
html[lang="ar"] #slide-out-widget-area .menu li.current-menu-ancestor > a:after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    right: 0; /* align underline with Arabic text */
    left: auto;
    height: 0.5px; /* thickness of the underline */
    width: 100%;
    background-color: currentColor;
    transform-origin: right center;
}

/* Ensure anchor itself positions correctly */
html[lang="ar"] #slide-out-widget-area .menu a {
    position: relative;
    text-align: right !important;
    display: inline-block !important;
    width: auto !important; /* underline matches text width */
}

/* Fix product image column spacing for Arabic layout - desktop only */
@media (min-width: 1025px) {
  html[lang="ar"] .single-product .span_5.col.single-product-main-image {
    margin-right: 0 !important;   /* remove space on right */
    padding-right: 0 !important;
    margin-left: 40px !important; /* add equal space on left */
    padding-left: 40px !important;
  }
}

/* Underline always visible - disappears on hover (desktop only) */
.join-account-btn {
  position: relative;
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

/* underline visible by default */
.join-account-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.3s ease;
}

/* on hover (desktop): underline disappears */
@media (hover: hover) and (pointer: fine) {
  .join-account-btn:hover::after {
    transform: scaleX(0);
    transform-origin: right;
  }
}

/* Increase font size on desktop */
@media (min-width: 1025px) {
  .join-account-btn {
    font-size: 18px; /* adjust as you like - try 18-20px */
  }
}

/* Keep smaller size on mobile */
@media (max-width: 1024px) {
  .join-account-btn {
    font-size: 16px;
  }
}

.cvl-complete-btn { padding:8px 12px; border:1px solid #000000; background:#ffffff; color:#000000; cursor:pointer; border-radius:4px; }
.cvl-complete-btn.completed { background:#000000; color:#fff; }
.cvl-progress { max-width: 900px; }

/* WooCommerce My Account downloads button color */
.woocommerce-MyAccount-downloads .woocommerce-MyAccount-downloads-file.button,
.woocommerce-MyAccount-downloads .button,
.woocommerce-order-downloads .woocommerce-MyAccount-downloads-file.button,
.woocommerce-order-downloads .button {
  background-color: #245de2 !important;
  border-color: #245de2 !important;
  color: #fff !important;
}

.woocommerce-MyAccount-downloads .woocommerce-MyAccount-downloads-file.button:hover,
.woocommerce-MyAccount-downloads .woocommerce-MyAccount-downloads-file.button:focus,
.woocommerce-MyAccount-downloads .button:hover,
.woocommerce-MyAccount-downloads .button:focus,
.woocommerce-order-downloads .woocommerce-MyAccount-downloads-file.button:hover,
.woocommerce-order-downloads .woocommerce-MyAccount-downloads-file.button:focus,
.woocommerce-order-downloads .button:hover,
.woocommerce-order-downloads .button:focus {
  background-color: #1f51c2 !important; /* slightly darker hover */
  border-color: #1f51c2 !important;
  color: #fff !important;
}

/* Hide Salient fixed floating share button on product pages */
.nectar-social.fixed,
#nectar-social-sharing,
.nectar-social.hover,
.nectar-social-inner,
.sharing-default-minimal {
  display: none !important;
}
