/* ============================================
   InchooDev_QuickOrder - Luma Styles
   ============================================ */

/* ------------------------------------------
   Title
   ------------------------------------------ */
.quickorder-index-index .page-title-wrapper {
    text-align: center;
}

/* ------------------------------------------
   Notice
   ------------------------------------------ */
.quickorder-notice {
    padding: 10px 12px;
    margin-bottom: 16px;
    background: #f0f7ff;
    color: #054594;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .quickorder-notice {
        text-align: center;
        margin-bottom: 25px;
    }
}

/* ------------------------------------------
   Container / Row
   ------------------------------------------ */
.quickorder-row {
    margin-bottom: 16px;
}

.quickorder-row-top {
    position: relative;
    display: flex;
    gap: 8px;
}

@media (min-width: 768px) {
    .quickorder-row-top {
        gap: 24px;
    }
}

/* ------------------------------------------
   Thumbnails
   ------------------------------------------ */
.quickorder-thumb {
    object-fit: contain;
}

.quickorder-thumb-placeholder {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    color: #ccc;
}

/* ------------------------------------------
   SKU / Search Area
   ------------------------------------------ */
.quickorder-search-col {
    flex: 1;
    height: 44px;
}

@media (min-width: 768px) {
    .quickorder-search-col {
        position: relative;
    }
}

.quickorder-search-col .input-text {
    height: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.quickorder-sku-badge {
    box-sizing: border-box;
    width: 100%;
    padding: 4px 8px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 100%;
    display: flex;
    align-items: center;
}

/* ------------------------------------------
   Search Dropdown
   ------------------------------------------ */
.quickorder-dropdown {
    margin: 0;
    padding: 0;
    position: absolute;
    z-index: 50;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
}

.quickorder-dropdown-item {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.quickorder-dropdown-item:hover {
    background: #f5f5f5;
}

.quickorder-dropdown-item-thumb {
    object-fit: contain;
}

@media (min-width: 768px) {
    .quickorder-dropdown-item-body {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

.quickorder-dropdown-sku {
    font-size: 15px;
    color: #666;
}

.quickorder-dropdown-name {
    font-size: 15px;
}

mark.quickorder-highlight {
    background-color: #fff3cd;
    color: inherit;
    font-weight: 600;
    padding: 0 1px;
    border-radius: 2px;
}

.quickorder-dropdown-price {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.quickorder-badge-configurable {
    color: #7c3aed;
    background: #f5f3ff;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
}

.quickorder-badge-bundle {
    color: #0369a1;
    background: #e0f2fe;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
}

/* ------------------------------------------
   No Results
   ------------------------------------------ */
.quickorder-no-results {
    position: absolute;
    z-index: 50;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fef2f2;
    border: 1px solid #dc2626;
    border-radius: 4px;
    padding: 8px;
    color: #dc2626;
    font-size: 13px;
}

/* ------------------------------------------
   Row Product Info (shown once a product is selected)
   ------------------------------------------ */
.quickorder-row-product {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
    background: #fafafa;
}

@media (min-width: 768px) {
    .quickorder-row-product {
        margin-right: 156px;
    }
}

.quickorder-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quickorder-name-col {
    flex: 2;
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.quickorder-options-accordion {
    margin-top: 6px;
}

.quickorder-options-toggle {
    font-size: 12px;
    font-weight: 500;
    color: #1979c3;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.quickorder-options-toggle:hover,
.quickorder-options-toggle:focus,
.quickorder-options-toggle:active {
    background: none;
    border: none;
    color: #1979c3;
    box-shadow: none;
}

.quickorder-options {
    font-size: 11px;
    color: #555;
    height: 0;
    margin: 0;
    overflow: hidden;
    transition: height 0.2s ease;
}

.quickorder-options dt {
    color: #828282;
}

.quickorder-options dt::after {
    content: ': ';
}

.quickorder-options dd {
    display: inline;
    margin: 0;
}

/* ------------------------------------------
   SKU Column
   ------------------------------------------ */
.quickorder-sku-col {
    flex: 1;
    font-size: 15px;
    color: #555;
}

.quickorder-sku-col span:first-child {
    color: #828282;
}

/* ------------------------------------------
   Price Column
   ------------------------------------------ */
.quickorder-price-col {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
}

/* ------------------------------------------
   Qty Controls
   ------------------------------------------ */
.quickorder-qty-col {
    display: flex;
}

input.quickorder-qty-input {
    height: 100%;
    width: 52px;
    text-align: center;
}

/* ------------------------------------------
   Remove Button
   ------------------------------------------ */
.quickorder-clear-btn {
    flex-shrink: 0;
    font-size: 24px;
    line-height: 1;
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
    color: #dc2626;
    width: 100%;
}

@media (min-width: 768px) {
    .quickorder-clear-btn {
        width: auto;
        margin-left: auto;
    }
}

/* ------------------------------------------
   Action Bar
   ------------------------------------------ */
.quickorder-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

@media (min-width: 768px) {
    .quickorder-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.quickorder-actions .left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .quickorder-actions .left {
        flex-wrap: nowrap;
        align-items: center;
        flex-direction: row;
    }
}


/* ------------------------------------------
   Modal Overlay
   ------------------------------------------ */
.quickorder-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quickorder-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.quickorder-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10;
    margin: 16px;
}

.quickorder-modal-dialog--sm {
    max-width: 600px;
}

.quickorder-modal-dialog--md {
    max-width: 700px;
}

.quickorder-modal-body {
    padding: 32px;
}

/* ------------------------------------------
   Modal Header
   ------------------------------------------ */
.quickorder-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.quickorder-modal-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quickorder-modal-thumb {
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
}

.quickorder-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.quickorder-modal-subtitle {
    font-size: 12px;
    color: #666;
}

.quickorder-modal-close {
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
}

/* ------------------------------------------
   Modal Form Section
   ------------------------------------------ */
.quickorder-modal-section {
    margin-bottom: 24px;
}

.quickorder-modal-section input.quickorder-qty-input {
    height: auto;
}

.quickorder-modal-field {
    margin-bottom: 12px;
}

.quickorder-modal-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
}

.quickorder-modal-select {
    width: 100%;
}

.quickorder-required {
    color: #dc2626;
}

/* ------------------------------------------
   Variant Preview
   ------------------------------------------ */
.quickorder-variant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quickorder-variant-sku {
    font-size: 13px;
    font-weight: 500;
}

.quickorder-variant-price {
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
}

.quickorder-stock-ok {
    color: #15803d;
    font-size: 13px;
    font-weight: 500;
}

.quickorder-stock-oos {
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
}

.quickorder-variant-placeholder {
    font-size: 13px;
    color: #aaa;
    margin: 0;
}

/* ------------------------------------------
   Modal Actions
   ------------------------------------------ */
.quickorder-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ------------------------------------------
   Bundle Option Card
   ------------------------------------------ */
.quickorder-bundle-option {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.quickorder-bundle-option-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.quickorder-bundle-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
}

.quickorder-bundle-qty-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.quickorder-bundle-qty-label {
    font-size: 12px;
    color: #666;
}

.quickorder-bundle-qty-input {
    width: 70px;
    text-align: center;
}

/* ------------------------------------------
   CSV Import
   ------------------------------------------ */
.quickorder-csv {
    margin-top: 20px;
}

.quickorder-csv-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 150px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

.quickorder-csv-dropzone--dragover {
    border-color: #60a5fa;
    background-color: #eff6ff;
}

.quickorder-csv-dropzone--uploading {
    cursor: wait;
    opacity: 0.5;
    pointer-events: none;
}

.quickorder-csv-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quickorder-csv-dropzone-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.quickorder-csv-dropzone-text {
    margin-bottom: 4px;
}

.quickorder-csv-upload-btn {
    margin-top: 4px;
}

.quickorder-csv-download-btn {
    margin-top: 4px;
}
