/* Main container styling */
#woocommerce-quick-order_wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

#woocommerce-quick-order_wrapper .dataTables_scrollHead {
	margin-top: 20px;
}

.quick-order-table-row .variations_button,
.woocommerce div.product .quick-order-table-row form.cart {
	padding: 0 !important;
}

.quick-order-table-row .variations_button button.button {
	font-size: 100%;
}

.quick-order-table-row:nth-child(even) {
	background-color: #f8fafc;
}
.quick-order-table-row:nth-child(odd) {
	background-color: #fff;
}

.quick-order-table-row:hover {
	background-color: #f0f4f8;
}

.woocommerce-quick-order th {
	text-align: center;
}

.woocommerce-quick-order th, .woocommerce-quick-order td {
	vertical-align: middle;
}

.woocommerce-quick-order-search th {
	font-weight: bold;
	text-transform: uppercase;
}

.woocommerce-quick-order th select {
	border-radius: 4px;
    background-color: #fff;
    border: 1px solid #e8e8e8;
    padding: 8px;
    transition: border-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.quick-order-value-im img {
  width: 100px;
}

#woocommerce-quick-order_wrapper button.dt-button {
    background: #FFF;
    border-radius: 4px;
    padding: 8px 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin: 5px;
}

#woocommerce-quick-order_wrapper button.dt-button:hover {
    background: #f7f7f7;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

#woocommerce-quick-order_wrapper button.buttons-pdf, #woocommerce-quick-order_wrapper button.buttons-pdf:hover {
	background-color: #c01f05;
	color: #FFF;
}

#woocommerce-quick-order_wrapper button.buttons-excel, #woocommerce-quick-order_wrapper button.buttons-excel:hover {
	background-color: #217448;
	color: #FFF;
}

#woocommerce-quick-order_wrapper button.buttons-csv, #woocommerce-quick-order_wrapper button.buttons-csv:hover {
	background-color: #484c55;
	color: #FFF;
}

#woocommerce-quick-order_wrapper button.buttons-print, #woocommerce-quick-order_wrapper button.buttons-print:hover {
	background-color: #b0c0d3;
	color: #FFF;
}

.woocommerce-quick-order th select {
	display: block;
	width: 100%;
    color: #333;
    font-size: 11px;
}

table.woocommerce-quick-order.dataTable thead .sorting,
table.woocommerce-quick-order.dataTable thead .sorting_asc,
table.woocommerce-quick-order.dataTable thead .sorting_desc {
	background-position: right 5px top 14px;
}

table.dataTable thead #quick-order-header-ca.sorting,
table.dataTable thead #quick-order-header-ca.sorting_asc,
table.dataTable thead #quick-order-header-ca.sorting_desc,
table.dataTable thead #quick-order-header-im.sorting,
table.dataTable thead #quick-order-header-im.sorting_asc,
table.dataTable thead #quick-order-header-im.sorting_desc {
	background: none;
}

.dataTables_wrapper .dataTables_length {
	clear: both;
    margin-top: 10px;
}

.rwd-table tr {
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}
.rwd-table th {
  display: none;
}
.rwd-table td {
  display: block;
}
.rwd-table td:first-child {
  padding-top: .5em;
}
.rwd-table td:last-child {
  padding-bottom: .5em;
}
.rwd-table td:before {
  content: attr(data-th) ": ";
  font-weight: bold;
  width: 6.5em;
  display: inline-block;
  vertical-align: top;
}

.rwd-table td.quick-order-value-ca:before {
	display: none;
}

.rwd-table th, .rwd-table td {
  text-align: left;
}

.quick-order-value-ca .woocommerce-variation-add-to-cart {
	text-align: center;
	display: inline-block;
}

.woocommerce div.product .quick-order-value-ca form.cart .button {
	text-align: center;
	float: none;
}

@media (min-width: 480px) {
	.rwd-table th, .rwd-table td {
		display: table-cell;
		padding: .25em .5em;
	}
	.rwd-table th:first-child, .rwd-table td:first-child {
		padding-left: 0;
	}
	.rwd-table th:last-child, .rwd-table td:last-child {
		padding-right: 0;
	}
	.rwd-table td:before {
		display: none;
	}
}

.rwd-table {
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.rwd-table tr {
  border-color: #dee2e6;
  transition: background-color 0.2s ease;
}
.rwd-table th, .rwd-table td {
  margin: .5em 1em;
}
@media (min-width: 480px) {
  .rwd-table th, .rwd-table td {
    padding: 1em !important;
  }
}

.woocommerce-quick-order .input {
	position: relative;
	z-index: 1;
	display: inline-block;
	margin: 0;
	max-width: 350px;
	width: calc(100% - 2em);
	vertical-align: top;
}

.woocommerce-quick-order-field {
	position: relative;
	display: block;
	padding: 0;
	width: 60%;
	border: none !important;
	border-radius: 0;
	color: #aaa;
	font-weight: bold;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	-webkit-appearance: none; /* for box shadows to show on iOS */
	appearance: none; /* Standard property for cross-browser compatibility */
	background: transparent !important;
}

.woocommerce-quick-order-field:focus {
	outline: none;
}

.woocommerce-quick-order-label {
	display: inline-block;
	padding: 0 1em;
	width: 40%;
	color: #4a5568;
	font-weight: 600;
	font-size: 80%;
	-webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.woocommerce-quick-order-label-content {
	position: relative;
	display: block;
	padding: 1.6em 0;
	width: 100%;
}

.woocommerce-quick-order-search-image {
	width: 80px;
	padding: 0 !important;
}

.woocommerce-quick-order-search-image img,
.woocommerce-quick-order-search-results-item-image img {
    max-width: 100%;
    height: auto;
}

.woocommerce-quick-order-search tr, .woocommerce-quick-order-search td {
	padding: 5px;
	border: 0;
}

.woocommerce-quick-order-search tbody {
    background: #f2f2f2;
}

a.woocommerce-quick-order-search-add-row {
	text-align: center;
	font-size: 12px;
	font-weight: bold;
	margin-top: 10px;
	margin-bottom: 20px;
	display: block;
}

.woocommerce-quick-order td button, .woocommerce-quick-order td .button {
	margin-bottom: 0;
}

.woocommerce-quick-order-search-add-to-cart {
	text-align: center;
}

.woocommerce-quick-order-search-input {
	width: 80%;
}

.woocommerce-quick-order-search-price {
	width: 10%;
}

a.woocommerce-quick-order-search-results-item {
    border-bottom: 1px solid #eee;
    display: block;
    padding: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

a.woocommerce-quick-order-search-results-item:hover {
	background: #f7f9fc;
}


.woocommerce-quick-order-search-results-item-stock-status-outofstock:hover {
	cursor: not-allowed;
}


.woocommerce-quick-order-search-results {
    position: absolute;
    background: #ffffff;
    width: 400px;
    z-index: 9999999999;
    border-radius: 0 0 12px 12px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 1px solid #eaeaea;
}

.woocommerce-quick-order-search-results-item-image {
	width: 100px;
	padding: 20px 20px 10px;
	float: left;
}

.woocommerce-quick-order-search-message {
    text-align: center;
    font-size: 13px;
    background: #607D8B;
    color: #FFF;
    padding: 10px 0;
    border-radius: 4px;
}

.woocommerce-quick-order-search-results-item-name {
    font-size: 16px;
    max-width: calc(100% - 120px);
    padding-top: 15px;
    float: left;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .woocommerce-quick-order-search-results-item-name {
        font-size: 14px;
        max-width: calc(100% - 90px);
        padding-top: 10px;
        margin-left: 5px;
    }
    
    .woocommerce-quick-order-search-results-item-sku,
    .woocommerce-quick-order-search-results-item-price,
    .woocommerce-quick-order-search-results-item-stock {
        clear: both;
        padding-left: 10px;
    }
}

.woocommerce-quick-order-search-input-indication {
    border-bottom: 2px solid red;
    width: 0%;
    -webkit-transition: width 2s; /* Safari */
    transition: width 2s;
}

.woocommerce-quick-order-search-results-item-sku,
.woocommerce-quick-order-search-results-item-price,
.woocommerce-quick-order-search-results-item-stock {
    display: block;
    font-size: 12px;
    font-weight: normal;
    line-height: 14px;
}

input[type="text"].woocommerce-quick-order-search-input-field,
input[type="number"].woocommerce-quick-order-search-quantity-field {
    padding: 12px 15px;
    width: 100%;
    border: 1px solid #eaeaea;
    color: #000;
    background: #FFF;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) inset;
}

input[type="text"].woocommerce-quick-order-search-input-field:focus,
input[type="number"].woocommerce-quick-order-search-quantity-field:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
}

input[type="text"].woocommerce-quick-order-search-input-field-has-image {
    background-position: left top;
    background-repeat: no-repeat;
    background-size: contain;
    padding-left: 80px;
}

.woocommerce-quick-order-results {
    position: absolute;
    background: #FFF;
    max-width: 350px;
    width: calc(100% - 2em);
}

.woocommerce-quick-order-result-item img {
	width: 150px;
}



.rwd-table td.woocommerce-quick-order-search-actions:before {
	display: none;
}

/* Additional Styling for Clear Mobile Experience */
.woocommerce-quick-order table {
    width: 100%;
    table-layout: fixed;
}

/* Custom scrollbar for search results */
.woocommerce-quick-order-search-results::-webkit-scrollbar {
    width: 8px;
}

.woocommerce-quick-order-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.woocommerce-quick-order-search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.woocommerce-quick-order-search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Better Touch Experience */
input[type="text"], 
input[type="number"],
button,
.button,
a.woocommerce-quick-order-search-add-row {
    touch-action: manipulation;
}

/* Enhance mobile responsiveness */
@media (max-width: 768px) {
	.woocommerce-quick-order-search-price {
		width: 100%;
	}

	.woocommerce-quick-order-search-input {
		width: 100%;
		padding: 0 10px;
		box-sizing: border-box;
	}

	.woocommerce-quick-order-search-results {
	    width: 100%;
	    left: 0;
	    right: 0;
	    max-width: 100%;
	    border-radius: 0 0 8px 8px;
	}

	.woocommerce-quick-order-search tr {
		border-bottom: 1px solid #333;
	}

	.woocommerce-quick-order-search {
		display: block;
		position: relative;
	}

	.woocommerce-quick-order-search-actions {
	    top: 10px;
	    position: absolute;
	    right: 10px;
	    font-size: 24px;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	}

	.quick-order-table-value {
		display: block;
		width: 100%;
	}
	
	.quick-order-table-header {
		display: none;
	}
}

table.dataTable.nowrap th, table.dataTable.nowrap td {
	white-space: normal !important;
}

.woocommerce-quick-order-short-description {
    font-size: 14px;
    line-height: 18px;
}

.woocommerce-quick-order-search-prominent #woocommerce-quick-order_filter {
	margin-top: 30px;
	margin-bottom: 70px;
}

.woocommerce-quick-order-search-prominent #woocommerce-quick-order_filter,
.woocommerce-quick-order-search-prominent #woocommerce-quick-order_filter label,
.woocommerce-quick-order-search-prominent #woocommerce-quick-order_filter input {
	text-align: center;
	display: block;
	width: 100%;
}


.woocommerce-quick-order-search-prominent #woocommerce-quick-order_filter label {
	font-size: 28px;
	line-height: 36px;
	font-weight: bold;
}

.woocommerce-quick-order-search-prominent #woocommerce-quick-order_filter input {
	margin-top: 10px;
	margin-left: 0;
	padding: 15px 20px;
	border-radius: 8px;
	border: 1px solid #ddd;
	transition: all 0.3s ease;
	max-width: 500px;
	margin: 10px auto 0;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.woocommerce-quick-order-search-prominent #woocommerce-quick-order_filter input:focus {
	border-color: #4a90e2;
	outline: none;
	box-shadow: 0 0 0 2px rgba(74,144,226,0.2), 0 2px 8px rgba(0,0,0,0.05);
}

.fixedHeader-floating {
	z-index: 99999999;
}

/* Improve quantity input on mobile */
@media (max-width: 768px) {
    input.qty {
        min-height: 40px;
        min-width: 40px;
        padding: 5px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

.quick-order-table-header input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    max-width: 100%;
    border: 1px solid #eee;
    background: #f7f7f7;
    color: #555;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.quick-order-table-header input[type="text"]:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
}