/*
Theme Name: NexCaisse vR
Theme URI: https://wordpress.org/themes/My Market/
Author: MEJBOUR ADIL
Author URI: https://wordpress.org
Description: no description yet
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.2
Version: 999.0
License: GNU General Public License v2 or later
License URI:  #
Text Domain: mymarket
Tags: No tags yet
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

.woocommerce-additional-fields h3 ,.woocommerce-billing-fields h3{
    display: none;
}

#payment{
	background-color: transparent;
}
.woocommerce-notices-wrapper{
	display: none!important;
}
#orders-table tbody td {
    padding:15px  20px; /* Set minimum height for each cell */
}
table.dataTable.order-column>tbody tr>.sorting_1, table.dataTable.order-column>tbody tr>.sorting_2, table.dataTable.order-column>tbody tr>.sorting_3, table.dataTable.display>tbody tr>.sorting_1, table.dataTable.display>tbody tr>.sorting_2, table.dataTable.display>tbody tr>.sorting_3{
	box-shadow: none!important;
}
table.dataTable.hover>tbody>tr:hover>*, table.dataTable.display>tbody>tr:hover>*{
	box-shadow: none!important;
	cursor: pointer;
}

#chosen_user_field {
	height: 50px;
    margin-bottom: 30px;
}

.custom-search-container{
	width: 50%;
}

.datatable-topbar {
	flex-direction: row-reverse;
    justify-content: space-between;
	padding: 0 10px;
	align-items: center;
}
 
#orders-table_filter{
	display: none;
}
.custom-search-container input{
	width: 100%;
}
.dataTables_length{ 
	display: none;
}

table.dataTable thead th, table.dataTable thead td{
	border-bottom: 1px solid #e9ebec;
}
tbody, td, tfoot, th, thead, tr {
	border-color: #e9ebec;
}
.custom-length-container {
    display: flex;
    gap: 24px;
    flex-direction: row-reverse;
}

.select2-selection__rendered{
	line-height: 36px!important;
}
.select2-container .select2-selection--single{
	height: 50px!important;
}
#chosen_user_field_field .select2-container{
	margin-bottom: 12px;
 }

 .card-radio .form-check-input:checked + .form-check-label img{
		filter: none;
 }
 .card-radio .form-check-label img{
	filter: grayscale(100%);
}
.select2-selection__arrow {
	height: 50px!important;
}

 .wc_payment_method label{
	height: 300px;
	display: flex;
	justify-content: center;
	align-content: center;
 
 }
 .wc_payment_method  img{
		width: 100%;
		height: 200px;
		object-fit: contain;
 }

 .place-order{
	padding: 0!important;
    margin-top: 30px!important;
 }
 .place-order button{
	width:100%;
 }
 .select2-container--default .select2-search--dropdown .select2-search__field{
	height: 34px!important;
 }

 
.autocomplete-box {
  border: 1px solid #ccc;
  max-height: 250px;
  overflow-y: auto;
  position: absolute;
  background: white;
  width: 300px;
  z-index: 9999;
}
.autocomplete-box li {
  padding: 8px;
  cursor: pointer;
  list-style: none;
}
.autocomplete-box li:hover {
  background-color: #f0f0f0;
}
 
.full-size-container img{
    width: 120px;
    height: 120px;
    object-fit: contain;
}
.ajax-add-to-cart:hover{
	cursor: pointer;
}
.ajax-add-to-cart{
	position: relative;
}
.ajax-add-to-cart:hover:before{
    content: "Ajouter au panier";
    background: rgba(	248, 64, 58, 0.6);
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    text-align: center;
    align-items: center;
    display: flex;
	color: #fff;
    justify-content: center;
    left: 0;
    right: 0;
    padding: 0;
    top: 0;
	border-radius: 0.25rem;
	font-size: 16px;
	font-weight: 700;
}
.card.product{
	min-height: 269px;
}

#vider-panier-btn{
	justify-content: center;
    align-items: center;
    font-size: 14px;
}

.pagination{
	display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
	margin: 30px 0;
}
.pagination .page-numbers{
	width: 42px;
    height: 42px;
    display: flex;
    border: 1px solid #e9ebec;
    background-color: #fff;
    text-align: center;
    align-items: center;
    justify-content: center;
    font-size: 14px;
	color:#0ab39c;
}
.pagination .page-numbers.current{
	background-color: #0ab39c;
	color: #fff;
}
.pagination .next.page-numbers{
	width: 120px;
}
.pagination .prev.page-numbers{
	width: 120px;
}
.text-right{
	text-align: right;
}

#productsTable tbody td {
	vertical-align: middle;
  }
  #productsTable tbody tr {
    height: 100px;
  }
 .product-listing-image img{
	height: 60px;
	width: 60px;
	object-fit: contain;
   }
   .small-image{
	height: 60px;
	width: 60px;
	object-fit: contain;
   }


   .is-valid {
    border-color: #198754 !important;
    background-color: #d1e7dd;
}
.is-invalid {
    border-color: #dc3545 !important;
    background-color: #f8d7da;
}
 

.panier_checkout .btn-success{
display: none;
}

.woocommerce-placeholder{
	width: 86px;
    height: 86px;
}

.spinner {
	display: inline-block;
	width: 50px;
	height: 50px;
	border: 3px solid #ccc;
	border-top: 3px solid #0073aa;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
	vertical-align: middle;
	margin-right: 5px;
	margin-top: 20px;
  }
  
  @keyframes spin {
	to { transform: rotate(360deg); }
  }
  

  .ajax-loader{
	position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
     justify-content: center;
    align-items: flex-start;
  }

  
	.app-menu {
		background-color: #274C96!important;
	}
  
  .app-menu.active{
	margin-left: 0;
	transition: margin-left 0.3s ease;
  }

  @media (max-width: 576px) {
	.full-size-container img{
		width: 90px;
		height: 90px;
	}
	.card.product{
		min-height: 200px;
	}
	.card.product .card-body{
		padding: 10px;
	}
	.card.product .fs-14{
		font-size: 12px!important;
	}
	.wc_payment_method label{
		height: 200px;
	}
  }

  .multi-line-trim-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2; /* nombre de lignes max */
	-webkit-box-orient: vertical;
	overflow: hidden;
  }

  .trimmed-text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
  }
  .product-quantity {
	width: 90px;
	text-align: center;
  }

 .bsp-wrap{
	min-height: 70.5px;
	 
 }

 .star-checkbox {
	cursor: pointer;
	font-size: 20px;
	color: #ccc; /* étoile grise par défaut */
	display: inline-block;
	user-select: none;
	position: relative;
	
  }
  
  .star-checkbox input {
	display: none; /* cache la checkbox */
  }
  
  .star-checkbox input:checked + .star {
	color: #dc3545; /* étoile en or quand checked */
	text-shadow: 0 0 1px #dc3545;
	
  }



 

.mini-cart-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 4px;
}

.mini-cart-toggle:hover {
    background: #eee;
}

.cart-icon {
    font-size: 20px;
}

.cart-count {
    background: #333;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.mini-cart-content {
 
 
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.custom-mini-cart:hover .mini-cart-content {
    display: block;
}

.mini-cart-items {
    max-height: 100%;
    overflow-y: auto;
    margin-bottom: 15px;
}

.mini-cart-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.product-thumbnail img {
    width: 60px;
    height: auto;
    margin-right: 15px;
}

.product-details {
    flex-grow: 1;
}

.product-details h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.3;
}

.product-price {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.product-quantity {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.product-quantity button {
    width: 25px;
    height: 25px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.product-quantity .quantity {
    margin: 0 10px;
    min-width: 20px;
    text-align: center;
}

.product-remove button {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    line-height: 1;
}

.product-remove button:hover {
    color: #ff0000;
}

.mini-cart-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.cart-subtotal {
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 16px;
}

 
 

 
.empty-cart {
    margin: 0;
    padding: 10px 0;
    text-align: center;
}

/* Loading state */
.loading .mini-cart-content {
    pointer-events: none;
    opacity: 0.7;
}

.loading .mini-cart-content:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7) url('<?php echo esc_url(admin_url("images/spinner-2x.gif")); ?>') center center no-repeat;
    background-size: 20px 20px;
}

/* Add to cart button states */
.add_to_cart_button.loading {
    opacity: 0.7;
    position: relative;
    padding-left: 35px;
}

.add_to_cart_button.loading:after {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

.add_to_cart_button.added {
    background-color: #4CAF50 !important;
}

/* Mini cart loading state */
.custom-mini-cart.loading .mini-cart-content {
    position: relative;
    min-height: 100px;
}

.custom-mini-cart.loading .mini-cart-content:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

