/**
 * Modern styling for BSS Fast Order - Hyvä Theme
 */

/* Container and form styling */
.bss-fastorder-form {
    @apply max-w-7xl mx-auto;
}

.table-wrapper {
    @apply bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden;
}

/* Toolbar styling */
.toolbar {
    @apply flex flex-wrap items-center gap-4 p-4 bg-gray-50 border-b border-gray-200;
}

.bss-search-bar {
    @apply flex-1 min-w-[300px] relative;
}

.bss-search-input,
.bss-search-input2 {
    @apply w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-primary transition-colors;
}

.bss-search-input:disabled {
    @apply bg-gray-100 cursor-not-allowed;
}

/* Autocomplete dropdown */
.bss-fastorder-autocomplete,
.bss-fastorder-autocomplete2 {
    @apply absolute top-full left-0 right-0 mt-2 bg-white border border-gray-200 rounded-lg shadow-lg z-50 max-h-96 overflow-y-auto;
}

.content-search-fastorder ul {
    @apply list-none p-0 m-0;
}

.content-search-fastorder li {
    @apply border-b border-gray-100 last:border-b-0;
}

.bss-row-suggest {
    @apply block p-3 hover:bg-gray-50 transition-colors no-underline;
}

.bss-product-info {
    @apply flex gap-4 items-start;
}

.bss-product-image img {
    @apply w-16 h-16 object-cover rounded;
}

.bss-product-name {
    @apply font-medium text-gray-900 mb-1;
}

.bss-product-sku {
    @apply text-sm text-gray-600 mb-1 flex items-center gap-2;
}

.bss-product-price {
    @apply text-primary font-semibold;
}

.bss-product-stock span {
    @apply text-sm text-red-600;
}

/* Sorter styling */
.toolbar-sorter {
    @apply flex items-center gap-2;
}

.toolbar-sorter select {
    @apply border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary;
}

.sorter-action {
    @apply inline-flex items-center justify-center w-10 h-10 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors no-underline text-gray-700;
}

/* Table styling */
.bss-fastorder-multiple-form {
    @apply w-full;
}

.bss-fastorder-multiple-form thead th {
    @apply px-4 py-3 text-left text-sm font-semibold text-white bg-primary;
}

.bss-fastorder-row {
    @apply border-b border-gray-200 hover:bg-gray-50 transition-colors;
}

.bss-fastorder-row td {
    @apply px-4 py-3;
}

/* Input fields */
.bss-fastorder-row input[type="text"],
.bss-fastorder-row input[type="number"] {
    @apply w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary;
}

/* Quantity controls */
.product_qty {
    @apply flex items-center gap-2;
}

.bss-product-qty-down,
.bss-product-qty-up {
    @apply w-8 h-8 flex items-center justify-center border border-gray-300 rounded-lg hover:bg-gray-100 transition-colors text-gray-700 font-bold;
}

.product_qty input[type="number"] {
    @apply text-center max-w-[80px];
}

/* Action buttons */
.bss-fastorder-row-edit button,
.bss-fastorder-row-delete button {
    @apply w-8 h-8 flex items-center justify-center border border-gray-300 rounded-lg hover:bg-gray-100 transition-colors;
}

.bss-fastorder-row-edit button span {
    @apply block w-4 h-4 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIj4KICA8cGF0aCBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0xNi44NjIgNC40ODdsMS42ODctMS42ODhhMS44NzUgMS44NzUgMCAxMTIuNjUyIDIuNjUyTDEwLjU4MiAxNi4wN2EzLjM3NSAzLjM3NSAwIDAxLTEuNDI3IDEuMDJsLTMuMTI0IDEuMDQxIDEuMDQxLTMuMTI0YTMuMzc1IDMuMzc1IDAgMDExLjAyLTEuNDI3bDguNzctOC43N3oiLz4KPC9zdmc+')] bg-center bg-no-repeat;
}

.button-bss-fastorder-row-delete span span {
    @apply block w-4 h-4 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIj4KICA8cGF0aCBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0xOS43MTQgNC4yODZhMSAxIDAgMDAtMS40MTQgMEwxMiA5LjU4NiA1LjcxNCAzLjI4NmExIDEgMCAxMC0xLjQxNCAxLjQxNEwxMC41ODYgMTEgNC4yODYgMTcuMjg2YTEgMSAwIDAwMS40MTQgMS40MTRMMT IgMTIuNDE0bDYuMjg2IDYuMjg2YTEgMSAwIDAwMS40MTQtMS40MTRMMTMuNDE0IDEybDYuMjg2LTYuMjg2YTEgMSAwIDAwMC0xLjQxNHoiLz4KPC9zdmc+')] bg-center bg-no-repeat;
}

/* Footer table styling */
.bss-fastorder-multiple-form tfoot td {
    @apply px-4 py-4 bg-gray-50 font-medium;
}

/* Bottom actions */
.bss-fastorde-bottom {
    @apply w-full mt-4;
}

.multiple-wishlist {
    @apply flex flex-col gap-4 p-4 bg-gray-50 rounded-lg border border-gray-200;
}

.multi-show {
    @apply flex flex-col gap-2;
}

.show-input {
    @apply text-sm font-medium text-gray-700;
}

#bss-multiple-sku {
    @apply w-full border border-gray-300 rounded-lg p-3 font-mono text-sm resize-y focus:ring-2 focus:ring-primary focus:border-primary;
}

.multi-wishlist-bottom {
    @apply space-y-4 p-4;
}

/* Buttons */
.bss-action-add,
.action.primary.tocart,
.bss-file-upload {
    @apply inline-flex items-center justify-center px-6 py-3 rounded-lg font-semibold transition-all duration-200 border-2;
}

.bss-action-add {
    @apply bg-white text-primary border-primary hover:bg-primary hover:text-white;
}

.action.primary.tocart.main-color,
.bss-file-upload.main-color {
    @apply bg-primary text-white border-primary hover:bg-white hover:text-primary;
}

.bss-addline {
    @apply mb-4;
}

/* CSV Upload */
.bss-sample-csv {
    @apply inline-flex items-center gap-2 text-sm text-primary hover:underline;
}

.bss-fastorder-hidden {
    @apply hidden;
}

/* Price display */
.bss-fastorder-row-price .price {
    @apply text-lg font-semibold text-gray-900;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toolbar {
        @apply flex-col items-stretch;
    }
    
    .bss-search-bar {
        @apply min-w-full;
    }
    
    .bss-fastorder-multiple-form {
        @apply text-sm;
    }
    
    .bss-fastorder-row td {
        @apply px-2 py-2;
    }
}

/* Template 2 specific adjustments */
.toolbar-sorter-template2 {
    @apply ml-auto;
}

.addtoline-template2,
.fillline-template2,
.totalqty-template2,
.subtotal-template2 {
    @apply text-center;
}

/* Loading state */
.bss-fastorder-form.loading {
    @apply opacity-50 pointer-events-none;
}

/* Permission message */
.permission-fast-order {
    @apply p-8 text-center text-gray-600 bg-gray-50 rounded-lg border border-gray-200;
}

/* Multi-select template 2 */
.check-new {
    @apply inline-flex items-center ml-2;
}

.check-new input[type="checkbox"] {
    @apply w-4 h-4 text-primary border-gray-300 rounded focus:ring-primary;
}

.bt-search-template2 {
    @apply p-4 bg-gray-50 border-t border-gray-200 flex justify-between items-center;
}

.apply-multiple-product {
    @apply btn btn-primary;
}
