/* ============================================================
   AZR Dehumidifier Comparer
   ============================================================ */

#azr-dh-compare {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 960px;
    margin: 0 auto 40px;
    color: #222;
}

/* ---- Dynamic comparison H1 ---- */
.azr-dh-comparison-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    line-height: 1.3;
}

/* ---- Slot header row ---- */
.azr-dh-slot-headers {
    display: grid;
    grid-template-columns: 220px 1fr 1fr;
    gap: 0 12px;
    align-items: start;
    margin-bottom: 0;
}

.azr-dh-label-col { /* spacer */ }

.azr-dh-slot-header {
    background: #f8fafc;
    border: 1px solid #dde3ea;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 16px 16px 0;
}

/* ---- Search input ---- */
.azr-dh-search-wrap {
    position: relative;
    margin-bottom: 14px;
}

.azr-dh-search {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 2px solid #0066cc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.azr-dh-search:focus { border-color: #0099ff; }

.azr-dh-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccd6e0;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 999;
    max-height: 260px;
    overflow-y: auto;
}
.azr-dh-dropdown li {
    padding: 9px 14px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.3;
}
.azr-dh-dropdown li:hover,
.azr-dh-dropdown li.highlighted { background: #e8f2ff; }

/* ---- Product header card ---- */
.azr-dh-product-header {
    text-align: center;
    padding-bottom: 16px;
    min-height: 120px;
}

.azr-dh-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: #999;
    font-size: 14px;
    border: 2px dashed #d0d9e4;
    border-radius: 6px;
}

.azr-dh-prod-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
}

.azr-dh-prod-title {
    font-size: 15px;
    font-weight: 700;
    color: #0066cc;
    line-height: 1.3;
    margin-bottom: 4px;
}

.azr-dh-prod-asin {
    font-size: 12px;
    color: #777;
}

/* ---- Stars — SVG ---- */
.azr-dh-stars {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.azr-dh-star-svg {
    width: 88px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.azr-dh-star-num {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.azr-dh-review-cnt {
    font-size: 12px;
    color: #0066cc;
    text-decoration: none;
}
.azr-dh-review-cnt:hover { text-decoration: underline; }

/* ---- Comparison table ---- */
.azr-dh-table-wrap {
    border-left: 1px solid #dde3ea;
    border-right: 1px solid #dde3ea;
    border-bottom: 1px solid #dde3ea;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.azr-dh-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.azr-dh-table td {
    padding: 11px 14px;
    font-size: 14px;
    vertical-align: top;
    border-bottom: 1px solid #eef1f5;
}

.azr-dh-table tr:last-child td { border-bottom: none; }

.azr-dh-row:nth-child(odd) td { background: #fff; }
.azr-dh-row:nth-child(even) td { background: #f4f7fb; }

.azr-dh-label {
    width: 220px;
    font-weight: 600;
    color: #444;
    background: #eef1f7 !important;
    border-right: 1px solid #dde3ea;
}

.azr-dh-val {
    color: #333;
    word-break: break-word;
}

/* highlight difference */
.azr-dh-val.different {
    background: #fffbea !important;
}

/* amazon link in table */
.azr-dh-val a {
    color: #0066cc;
    text-decoration: none;
    font-size: 13px;
}
.azr-dh-val a:hover { text-decoration: underline; }

/* ---- Clear slot button ---- */
.azr-dh-clear-slot {
    display: block;
    margin: 6px 0 10px auto;
    background: none;
    border: 1px solid #ccd6e0;
    border-radius: 4px;
    color: #888;
    font-size: 12px;
    padding: 3px 10px;
    cursor: pointer;
    line-height: 1.4;
    transition: color .15s, border-color .15s;
}
.azr-dh-clear-slot:hover {
    color: #c0392b;
    border-color: #c0392b;
}

/* ============================================================
   Product List [dehumidifier_list]  — styled to match azratings.com
   ============================================================ */

.azr-dh-list {
    max-width: 960px;
    margin: 0 auto 48px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
}

/* ---- Toolbar: title + search ---- */
.azr-dhl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: #1a1a2e;
    padding: 14px 18px;
}

.azr-dhl-toolbar-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
    margin: 0;
}

.azr-dhl-filter-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.azr-dhl-filter {
    padding: 7px 12px 7px 32px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 9px center;
    width: 200px;
    outline: none;
    color: #222;
}
.azr-dhl-filter::placeholder { color: #aaa; }

.azr-dhl-count {
    color: #aac4f0;
    font-size: 12px;
    white-space: nowrap;
}

/* ---- Table ---- */
.azr-dh-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

/* Sortable header */
.azr-dh-list-table thead th {
    background: #16213e;
    color: #c8d8f0;
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    user-select: none;
}

.azr-dh-list-table thead th.sortable {
    cursor: pointer;
}
.azr-dh-list-table thead th.sortable:hover {
    background: #0f3460;
    color: #fff;
}

/* Sort arrows */
.azr-dhl-sort-icon {
    display: inline-block;
    margin-left: 5px;
    opacity: .4;
    font-style: normal;
    font-size: 10px;
}
th.sort-asc  .azr-dhl-sort-icon,
th.sort-desc .azr-dhl-sort-icon { opacity: 1; color: #4da6ff; }
th.sort-asc  .azr-dhl-sort-icon::after { content: ' ▲'; }
th.sort-desc .azr-dhl-sort-icon::after { content: ' ▼'; }
th:not(.sort-asc):not(.sort-desc) .azr-dhl-sort-icon::after { content: ' ⇅'; }

/* ---- Rows ---- */
.azr-dhl-row {
    border-bottom: 1px solid #eef1f6;
    transition: background .1s;
}
.azr-dhl-row:nth-child(odd)  { background: #fff; }
.azr-dhl-row:nth-child(even) { background: #f7f9fc; }
.azr-dhl-row:hover           { background: #eaf3ff; }
.azr-dhl-row.hidden          { display: none; }

/* Slot highlight — left accent bar */
.azr-dhl-row.in-slot-1 { border-left: 4px solid #0066cc; }
.azr-dhl-row.in-slot-2 { border-left: 4px solid #e67e22; }
.azr-dhl-row.in-slot-1.in-slot-2 { border-left: 4px solid #8e44ad; }

.azr-dh-list-table td {
    padding: 10px 14px;
    vertical-align: middle;
    color: #2c2c2c;
}

/* Image cell */
.azr-dhl-img-cell {
    width: 68px;
    text-align: center;
}
.azr-dhl-thumb {
    width: 54px;
    height: 54px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    background: #fafafa;
    border: 1px solid #eee;
    padding: 2px;
}
.azr-dhl-no-img { color: #ccc; font-size: 11px; }

/* Product name */
.azr-dhl-name {
    font-weight: 600;
    color: #1a1a2e;
    min-width: 160px;
    line-height: 1.35;
}
.azr-dhl-name small {
    display: block;
    font-weight: 400;
    color: #888;
    font-size: 11px;
    margin-top: 2px;
}

/* Capacity */
.azr-dhl-cap {
    color: #444;
    font-size: 13px;
    min-width: 100px;
    white-space: nowrap;
}

/* Floor area */
.azr-dhl-floor {
    color: #444;
    font-size: 13px;
    min-width: 100px;
    white-space: nowrap;
}

/* Action column */
.azr-dhl-action {
    white-space: nowrap;
    min-width: 130px;
    text-align: right;
}

/* Compare buttons */
.azr-dhl-btn {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    margin: 2px 2px 2px 0;
    transition: background .15s, transform .1s, box-shadow .1s;
    letter-spacing: .2px;
}
.azr-dhl-btn:hover  { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.azr-dhl-btn:active { transform: translateY(0); box-shadow: none; }

.azr-dhl-btn-p1 { background: #0066cc; color: #fff; }
.azr-dhl-btn-p2 { background: #e67e22; color: #fff; }

.azr-dhl-btn-p1.active { background: #004499; }
.azr-dhl-btn-p2.active { background: #b85e10; }

/* ---- No results row ---- */
.azr-dhl-no-results {
    display: none;
    text-align: center;
    color: #999;
    padding: 24px;
    font-size: 14px;
}

/* ---- Responsive ---- */
@media (max-width: 680px) {
    .azr-dh-slot-headers {
        grid-template-columns: 110px 1fr 1fr;
        gap: 0 8px;
    }
    .azr-dh-label { width: 110px; font-size: 12px; }
    .azr-dh-table td { font-size: 12px; padding: 8px 8px; }
}

/* ============================================================
   [dehumidifier_comparisons] — paginated pair list
   ============================================================ */

.azr-dh-comparisons {
    max-width: 960px;
    margin: 0 auto 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.azr-dh-comp-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 14px;
}

.azr-dh-comp-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    overflow: hidden;
}

.azr-dh-comp-item {
    border-bottom: 1px solid #eef1f6;
}
.azr-dh-comp-item:last-child { border-bottom: none; }
.azr-dh-comp-item:nth-child(odd)  { background: #fff; }
.azr-dh-comp-item:nth-child(even) { background: #f7f9fc; }
.azr-dh-comp-item:hover { background: #eaf3ff; }

.azr-dh-comp-item a {
    display: block;
    padding: 11px 16px;
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: color .12s;
}
.azr-dh-comp-item a:hover { color: #004499; text-decoration: underline; }

/* ---- Pagination ---- */
.azr-dh-comp-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}

.azr-dh-comp-page-btn {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ccd6e8;
    border-radius: 5px;
    font-size: 13px;
    color: #0066cc;
    background: #fff;
    text-decoration: none;
    transition: background .12s, color .12s;
}
.azr-dh-comp-page-btn:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}
.azr-dh-comp-page-btn.active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
    font-weight: 700;
    pointer-events: none;
}

.azr-dh-comp-ellipsis {
    padding: 0 4px;
    color: #999;
    font-size: 14px;
}
