/* ============================================================
   LGD Wishlist - Frontend Styles
   ============================================================ */

/* ---------- Wishlist Icon Button ---------- */
.wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 2px solid #d5d5d5;
    background: #fff;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
    transition: all .2s ease;
    margin: 4px 2px;
    padding: 0;
}
.wishlist-btn i { pointer-events: none; }

.wishlist-btn.not-wishlist {
    border-color: #d5d5d5;
    background: #fff;
    color: #666;
}
.wishlist-btn.not-wishlist:hover {
    border-color: #0071a1;
    background: #f0f0f0;
    color: #0071a1;
}
.wishlist-btn.added-wishlist {
    border-color: #6a2c91;
    background: #f5f0ff;
    color: #6a2c91;
}
.wishlist-btn.added-wishlist:hover {
    border-color: #6a2c91;
    background: #e9e1ff;
}

/* hint.css tooltip classes are provided by hint.min.css */

/* ---------- Wishlist Count (number only) ---------- */
.wishlist-count-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 30px;
    color: #333;
    font-weight: 600;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
}
.wishlist-count-number:hover { background: #005a87; }
.wishlist-count-label { font-weight: 600; }

/* ---------- Wishlist View Button (text + count) ---------- */
.wishlist-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid #0071a1;
    background: #0071a1;
    color: #fff;
    cursor: pointer;
    border-radius: 26px;
    font-size: 14px;
    font-weight: 600;
    transition: all .2s ease;
}
.wishlist-view-btn:hover {
    background: #005a87;
    border-color: #005a87;
}
.wishlist-view-btn .wishlist-count-number {
    height: 20px !important;
    width: max-content !important;
    min-width: 15px !important;
    max-width: 35px !important;
    padding: 0px 10px !important;
    background: #222 !important;
    color: #fff !important;
    font-size: 14px !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute !important;
    top: -11px !important;
    right: -5px !important;
    border-radius: 4px !important;
    transition: all .2s ease;
}

/* ---------- Wishlist View Modal ---------- */
.wishlist-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}
.wishlist-view-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .55);
}
.wishlist-view-modal-content {
    position: relative;
    width: 92%;
    max-width: 1240px;
    max-height: 85vh;
    margin: 4vh auto;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 44px rgba(0, 0, 0, .25);
}
.wishlist-view-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 22px;
    border: none;
    background: none;
    cursor: pointer;
    color: red;
    z-index: 10;
    line-height: 1;
}
.wishlist-view-modal-close i { pointer-events: none; }
.wishlist-view-modal-close:hover { color: #c00; transform: rotate(90deg); }

.wishlist-view-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.wishlist-view-modal-header h3 { margin: 0; font-size: 18px; }
.wishlist-view-count {
    background: #0071a1;
    color: #fff;
    border-radius: 14px;
    padding: 2px 10px;
    font-weight: 700;
}
.wishlist-view-toggle { display: flex; gap: 6px; }
.wishlist-view-toggle button {
    width: 38px;
    height: 38px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wishlist-view-toggle button.active {
    background: #0071a1;
    color: #fff;
    border-color: #0071a1;
}

.wishlist-view-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.wishlist-view-modal-body.mode-grid .wishlist-view-grid { display: flex; }
.wishlist-view-modal-body.mode-grid .wishlist-view-list { display: none; }
.wishlist-view-modal-body.mode-list .wishlist-view-grid { display: none; }
.wishlist-view-modal-body.mode-list .wishlist-view-list { display: block; }

/* Grid view items */
.wishlist-view-grid {
    display: flex;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}
.wishlist-view-item {
    border: 1px solid #e0e0e0;
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    position: relative;
}
.wishlist-view-item .wishlist-view-remove {
    position: absolute;
    top: 6px;
    right: 8px;
    border: none;
    background: none;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    line-height: 1;
}
.wishlist-view-item .wishlist-view-remove i { pointer-events: none; }
.wishlist-view-item .wishlist-view-remove:hover i {
    color: #c00;
    transform: rotate(180deg);
    transition: transform .3s ease;
}
.wishlist-view-item img { max-width: 100%; height: auto; margin-bottom: 8px; display: block; margin-left: auto; margin-right: auto; }
.wishlist-view-item-title { font-weight: 600; margin-bottom: 6px; }
.wishlist-view-item-price { color: #0071a1; font-weight: 600; margin-bottom: 10px; }
.wishlist-view-item-actions { display: flex; gap: 8px; justify-content: center; }

/* List view items */
.wishlist-view-list-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
}
.wishlist-view-list-item .wishlist-view-remove {
    border: none;
    background: none;
    cursor: pointer;
    color: #999;
    font-size: 18px;
}
.wishlist-view-list-item .wishlist-view-remove i { pointer-events: none; }
.wishlist-view-list-item .wishlist-view-remove:hover i {
    color: #c00;
    transform: rotate(180deg);
    transition: transform .3s ease;
}
.wishlist-view-list-image { flex: 0 0 80px; }
.wishlist-view-list-image img { max-width: 100%; height: auto; }
.wishlist-view-list-info { flex: 1; }
.wishlist-view-list-title { font-weight: 600; }
.wishlist-view-list-price { color: #0071a1; font-weight: 600; }
.wishlist-view-list-actions { display: flex; gap: 8px; margin-top: 6px; }

.wishlist-view-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}
.wishlist-view-full-link { display: inline-block; }

/* ---------- Added / Removed message modals ---------- */
.wishlist-message-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999998;
    pointer-events: none;
}
.wishlist-message-content {
    background: #fff;
    border: 2px solid #2e7d32;
    border-radius: 14px;
    padding: 22px 34px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
    font-weight: 700;
    font-size: 17px;
}
.wishlist-message-content i { font-size: 34px; display: block; margin-bottom: 8px; }
.wishlist-message-content.added i { color: #2e7d32; }
.wishlist-message-content.removed { border-color: #c62828; }
.wishlist-message-content.removed i { color: #c62828; }

/* ---------- Wishlist Page: static panel + carousel ---------- */
.lgd-wishlist-page-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 0;
}
.lgd-wishlist-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.lgd-wishlist-page-title { margin: 0; font-size: 22px; }
.lgd-wishlist-empty-state {
    text-align: center;
    padding: 50px;
    background: #f9f9f9;
    border-radius: 8px;
}
.lgd-wishlist-empty-state i { font-size: 40px; color: #bbb; display: block; margin-bottom: 12px; }

.lgd-wishlist-area {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

/* 300px static data panel */
.lgd-wishlist-static-panel {
    flex: 0 0 300px;
    background: #f5f6f8;
    border-right: 1px solid #e0e0e0;
}
.lgd-wishlist-panel-head {
    padding: 14px 16px;
    font-weight: 700;
    background: #0071a1;
    color: #fff;
    text-align: center;
}
.lgd-wishlist-panel-row {
    padding: 14px 16px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
}
.lgd-wishlist-panel-row-image { min-height: 150px; }
.lgd-wishlist-panel-row-title { min-height: 44px; }
.lgd-wishlist-panel-row-price { min-height: 44px; }
.lgd-wishlist-panel-row-view { min-height: 44px; }

/* Wishlist items container */
.lgd-wishlist-items-container {
    flex: 1;
    min-width: 0;
    position: relative;
}
.lgd-wishlist-swiper {
    width: 100%;
    height: 100%;
}
.lgd-wishlist-item {
    background: #fff;
    border-right: 1px solid #e0e0e0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.lgd-wishlist-item-remove {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 5;
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    font-size: 15px;
}
.lgd-wishlist-item-remove i { pointer-events: none; }
.lgd-wishlist-item-remove:hover i {
    color: #c00;
    transform: rotate(180deg);
    transition: transform .3s ease;
}

.lgd-wishlist-item-cell {
    padding: 14px 16px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
}
.lgd-wishlist-item-cell-image { min-height: 150px; }
.lgd-wishlist-item-cell-image img { max-width: 100%; height: auto; }
.lgd-wishlist-item-cell-title { min-height: 44px; }
.lgd-wishlist-item-cell-price { min-height: 44px; font-weight: 700; }
.lgd-wishlist-item-cell-view { min-height: 44px; }
.lgd-wishlist-item-cell-view .button { padding: 6px 12px; font-size: 13px; }

/* Swiper navigation */
.lgd-wishlist-swiper .swiper-button-prev,
.lgd-wishlist-swiper .swiper-button-next {
    color: #0071a1;
}
.lgd-wishlist-swiper .swiper-pagination {
    position: static;
    margin-top: 10px;
    text-align: center;
}

/* ---------- Charts section ---------- */
.lgd-wishlist-charts-section {
    margin-top: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}
.lgd-wishlist-charts-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.lgd-wishlist-charts-head h3 { margin: 0; }
.lgd-wishlist-chart-type-toggle { display: flex; gap: 8px; }
.lgd-wishlist-chart-type-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
}
.lgd-wishlist-chart-type-btn.active {
    border-color: #0071a1;
    background: #0071a1;
    color: #fff;
}
.lgd-wishlist-chart-wrapper { background: #fff; border-radius: 8px; }

/* ---------- Matching products table ---------- */
.lgd-wishlist-matching-section {
    margin-top: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}
.lgd-wishlist-matching-title { margin: 0 0 14px; }
.lgd-wishlist-matching-scroll { overflow-x: auto; }
.lgd-wishlist-matching-table {
    width: 100%;
    border-collapse: collapse;
}
.lgd-wishlist-matching-table th,
.lgd-wishlist-matching-table td {
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    text-align: left;
}
.lgd-wishlist-matching-table th { background: #f5f6f8; }
.lgd-wishlist-matching-image img { max-width: 60px; height: auto; }

/* ---------- Single product wrapper ---------- */
.lgd-wishlist-single-wrapper { margin-top: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .lgd-wishlist-static-panel { flex: 0 0 260px; }
}
@media (max-width: 991px) {
    .lgd-wishlist-static-panel { flex: 0 0 200px; }
    .lgd-wishlist-item-cell-image { min-height: 110px; }
}
@media (max-width: 767px) {
    .lgd-wishlist-area { flex-direction: column; }
    .lgd-wishlist-static-panel {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    .lgd-wishlist-items-container { width: 100%; }
    .wishlist-view-modal-content { width: 95%; margin: 3vh auto; }
    .wishlist-view-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .lgd-wishlist-matching-table th, .lgd-wishlist-matching-table td { font-size: 13px; }
}
@media (max-width: 480px) {
    .lgd-wishlist-page-header { flex-direction: column; gap: 10px; }
    .wishlist-view-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}