/* ========================================================= */
/* --- FILE: minimal-popup-style.css (V7 Rewrite) --- */
/* --- รองรับ 5x12 สี (60 สี) + Responsive 3 Screen --- */
/* ========================================================= */

/* ===========================================
   1. MODAL OVERLAY
   =========================================== */
#gustabe-minimal-modal {
    position: fixed;
    z-index: 9999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    font-family: "Sarabun", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===========================================
   2. MODAL BOX (Desktop: 600px width)
   =========================================== */
#gustabe-minimal-modal .gustabe-qv-box {
    position: relative;
    width: 94%;
    max-width: 600px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* ===========================================
   3. CLOSE BUTTON
   =========================================== */
#gustabe-minimal-modal .gustabe-qv-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}
#gustabe-minimal-modal .gustabe-qv-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* ===========================================
   4. MODAL CONTENT CONTAINER
   =========================================== */
.gustabe-minimal-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

/* ===========================================
   5. PRODUCT IMAGE
   =========================================== */
.gustabe-minimal-img-wrap {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 16px auto;
    padding-top: 35%;
    position: relative;
    flex-shrink: 0;
}
.gustabe-minimal-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ===========================================
   6. PRODUCT TITLE
   =========================================== */
.gustabe-minimal-header {
    text-align: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.gustabe-minimal-title {
    margin: 0;
    line-height: 1.3;
    color: #222;
}
.gustabe-title-20px {
    font-size: 18px !important;
    font-weight: 700;
}

/* ===========================================
   7. COLOR GRID SECTION (Scrollable)
   รองรับ 5 คอลัมน์ x 12 แถว = 60 สี
   =========================================== */
.gustabe-qv-colors-section,
.gustabe-qv-scroll-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
}

/* Custom Scrollbar for scroll-area */
.gustabe-qv-scroll-area::-webkit-scrollbar {
    width: 6px;
}
.gustabe-qv-scroll-area::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}
.gustabe-qv-scroll-area::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.gustabe-qv-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Custom Scrollbar */
.gustabe-qv-colors-section::-webkit-scrollbar {
    width: 6px;
}
.gustabe-qv-colors-section::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}
.gustabe-qv-colors-section::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.gustabe-qv-colors-section::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ===========================================
   8. COLOR GRID (5 Columns)
   =========================================== */
.gustabe-qv-colors-row,
.gustabe-qv-colors-grid.gustabe-colors-5-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

/* ===========================================
   9. COLOR SWATCH
   =========================================== */
.gustabe-popup-swatch {
    width: 100%;
    padding-top: 100%; /* Square */
    border-radius: 8px;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Hover: Cyan Border */
.gustabe-popup-swatch:hover {
    box-shadow: 0 0 0 3px #4dd0e1;
}

/* Selected: Cyan Border */
.gustabe-popup-swatch.selected {
    box-shadow: 0 0 0 3px #4dd0e1;
}

/* ===========================================
   10. SWATCH LABEL (Show on Hover)
   =========================================== */
.gustabe-swatch-name {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0 !important;
    padding: 4px 2px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 2;
}
.gustabe-popup-swatch:hover .gustabe-swatch-name {
    display: block;
}

/* ===========================================
   11. TOOLTIP (Selected Color Code)
   =========================================== */
.gustabe-qv-color-tooltip {
    text-align: center;
    margin-top: 12px;
    flex-shrink: 0;
}

/* ===========================================
   12. CTA LINK
   =========================================== */
.gustabe-color-set-label {
    text-align: center;
    font-size: 14px;
    color: #333;
    margin-top: 8px;
    font-weight: 500;
    flex-shrink: 0;
}
.gustabe-color-set-name-text {
    font-weight: 700;
    color: #000;
}

/* ===========================================
   RESPONSIVE: TABLET (max-width: 768px)
   =========================================== */
@media (max-width: 768px) {
    #gustabe-minimal-modal .gustabe-qv-box {
        max-width: 500px;
        max-height: 85vh;
    }
    .gustabe-minimal-container {
        padding: 20px;
    }
    .gustabe-minimal-img-wrap {
        max-width: 240px;
        padding-top: 30%;
    }
    .gustabe-title-20px {
        font-size: 17px !important;
    }
    .gustabe-qv-colors-row,
    .gustabe-qv-colors-grid.gustabe-colors-5-cols {
        gap: 6px;
    }
    .gustabe-swatch-name {
        font-size: 10px;
    }
}

/* ===========================================
   RESPONSIVE: MOBILE (max-width: 480px)
   =========================================== */
@media (max-width: 480px) {
    #gustabe-minimal-modal .gustabe-qv-box {
        width: 96%;
        max-width: none;
        max-height: 90vh;
        border-radius: 12px;
        margin: 0 auto;
    }
    .gustabe-minimal-container {
        padding: 16px 12px;
    }
    #gustabe-minimal-modal .gustabe-qv-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    .gustabe-minimal-img-wrap {
        max-width: 200px;
        padding-top: 28%;
        margin-bottom: 12px;
    }
    .gustabe-title-20px {
        font-size: 16px !important;
    }
    .gustabe-minimal-header {
        margin-bottom: 12px;
    }
    /* Mobile: 4 Columns */
    .gustabe-qv-colors-row,
    .gustabe-qv-colors-grid.gustabe-colors-5-cols {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
    .gustabe-popup-swatch {
        border-radius: 6px;
    }
    .gustabe-swatch-name {
        font-size: 9px;
        padding: 3px 2px;
        border-bottom-left-radius: 6px;
        border-bottom-right-radius: 6px;
    }
    .gustabe-color-set-label {
        font-size: 13px;
    }
}

/* ===========================================
   V6 MINIMAL BUTTON (Pill Shape)
   =========================================== */
.gustabe-v6-container {
    display: inline-block;
    padding: 5px 0;
}

.gustabe-card-trigger.v6-minimal-button {
    cursor: pointer;
}

.gustabe-btn-shade {
    background-color: #2196f3;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.2s,
        box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
}

.gustabe-btn-shade .dashicons-art {
    margin-right: 8px;
    font-size: 18px;
}

.gustabe-btn-shade:hover {
    background-color: #1e88e5;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}
