/* -------------------------------------------------
   GENERAL CONTAINER
------------------------------------------------- */
#aerots-dk-container {
    max-width: 1200px;
    margin: 30px auto;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #222;
}

/* -------------------------------------------------
   HEADER + MAIN SEARCH
------------------------------------------------- */
#aerots-dk-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#dk-results-count {
    font-size: 18px;
    font-weight: 600;
}

.dk-search-main {
    display: flex;
    gap: 8px;
    flex: 0 0 420px;
}

#@aerots-dk-search-input,
#aerots-dk-search-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#aerots-dk-search-btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    background: #0069d9;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}
#aerots-dk-search-btn:hover {
    background: #0050ac;
}

/* -------------------------------------------------
   FILTER ROW
------------------------------------------------- */
#aerots-dk-filter-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 10px;
    margin-bottom: 10px;
    background: #f4f5f7;
    border: 1px solid #dcdde1;
    border-radius: 4px;
    gap: 20px;
}

.dk-filter-flags label {
    margin-right: 12px;
    white-space: nowrap;
    font-size: 12px;
}

.dk-filter-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.dk-search-within input {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 220px;
    font-size: 12px;
}

.dk-filter-manufacturer label {
    font-size: 12px;
    margin-right: 4px;
}

.dk-filter-manufacturer select {
    min-width: 200px;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 12px;
}

#dk-filter-apply,
#aerots-dk-filter-apply {
    margin-left: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    background: #0069d9;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}
#aerots-dk-filter-apply:hover {
    background: #0050ac;
}

/* -------------------------------------------------
   RESULTS TABLE
------------------------------------------------- */
.dk-placeholder {
    color: #777;
    margin-top: 10px;
}

.dk-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #fff;
    border: 1px solid #dcdde1;
}

.dk-table th,
.dk-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e1e4ea;
    vertical-align: top;
}

.dk-table th {
    background: #1f2a44;
    color: #fff;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 12px;
}

.dk-table tbody tr:nth-child(even) {
    background: #f8f9fb;
}

.dk-col-select {
    width: 32px;
    text-align: center;
}
.dk-col-image {
    width: 70px;
}
.dk-col-mpn {
    width: 140px;
}
.dk-col-mfg {
    width: 160px;
}
.dk-col-desc {
    width: 280px;
}
.dk-col-ds {
    width: 90px;
}
.dk-col-qty {
    width: 110px;
}
.dk-col-price {
    width: 130px;
}
.dk-col-order {
    width: 140px;
}

/* Images */
.dk-table-img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    cursor: zoom-in;
}

/* Qty + status */
.dk-qty-available {
    font-weight: 600;
}
.dk-qty-status {
    font-size: 11px;
    color: #555;
}

/* Pricing */
.dk-price-main {
    cursor: pointer;
    font-weight: 600;
}

/* Qty to order + Add btn */
.dk-qty-input {
    width: 70px;
    padding: 4px 6px;
    margin-bottom: 4px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.dk-add-to-cart {
    display: inline-block;
    padding: 5px 10px;
    background: #d32026;
    color: #fff;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 12px;
}
.dk-add-to-cart:hover {
    background: #b8191f;
}

/* Datasheet link */
.dk-col-ds a {
    color: #0069d9;
    text-decoration: none;
    font-size: 12px;
}
.dk-col-ds a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------
   BOTTOM BAR (page size + pagination)
------------------------------------------------- */
#dk-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 12px;
}

.dk-page-size select {
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.dk-pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

.dk-page-btn {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ccd1dd;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
}
.dk-page-btn.dk-active {
    background: #0069d9;
    color: #fff;
    border-color: #0069d9;
}
.dk-page-btn.dk-disabled {
    opacity: 0.4;
    cursor: default;
}
.dk-page-ellipsis {
    padding: 0 4px;
    color: #999;
}

/* -------------------------------------------------
   STICKY BULK BAR
------------------------------------------------- */
.dk-bulk-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    margin-top: 15px;
    padding: 8px 12px;
    background: #fff;
    border-top: 2px solid #e1e4ea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.dk-bulk-bar.dk-hidden {
    display: none;
}

.dk-bulk-info {
    font-size: 13px;
}

.dk-bulk-add-btn {
    padding: 6px 14px;
    border-radius: 4px;
    background: #ff6c00;
    border: none;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.dk-bulk-add-btn:hover {
    background: #e55f00;
}

/* -------------------------------------------------
   IMAGE PREVIEW OVERLAY
------------------------------------------------- */
.dk-image-preview {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.dk-image-preview-inner img {
    max-width: 420px;
    max-height: 420px;
    background: #fff;
    padding: 6px;
    border-radius: 4px;
}

/* === Override price tooltip to appear near price cell === */
#dk-price-tooltip {
    position: fixed;                  /* we position it from JS */
    display: none;                    /* JS uses fadeIn/fadeOut */
    background: #ffffff;
    border: 1px solid #e1e4ea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    max-width: 260px;
    z-index: 998;
    pointer-events: none;             /* keeps it from stealing hover, no flicker */
}

#dk-price-tooltip-inner {
    padding: 8px 10px;
}


.dk-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.dk-price-table th,
.dk-price-table td {
    padding: 4px 6px;
    border: 1px solid #e1e4ea;
}
.dk-price-table th {
    background: #f4f5f7;
    font-weight: 600;
}

/* -------------------------------------------------
   RESPONSIVE
------------------------------------------------- */
@media (max-width: 900px) {
    #aerots-dk-search-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .dk-search-main {
        width: 100%;
    }

    #aerots-dk-filter-row {
        flex-direction: column;
    }

    .dk-filter-right {
        flex-direction: column;
        align-items: flex-start;
    }

    .dk-table {
        font-size: 11px;
    }
}



/* === AeroTS DK – Full-width layout overrides === */

/* This is the wrapper from your page template */
.aerots-dk-page-wrapper {
    max-width: 100% !important;   /* override inline 1200px */
    margin: 0 !important;         /* remove centered margin */
    padding: 10px !important;     /* small global padding */
    box-sizing: border-box;
}

/* Make plugin container use all available width */
#aerots-dk-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 20px;
    padding: 0;
    box-sizing: border-box;
}

/* Let the results table scroll horizontally on small screens */
#aerots-dk-results {
    width: 100%;
    overflow-x: auto;
}


/* === AeroTS DK – Fix flickering hover overlays === */

/* These IDs match the elements already in your shortcode markup */
#dk-image-preview,
#dk-price-tooltip {
    pointer-events: none;   /* mouse goes through to the cell underneath */
}
