/**
 * POD-Functions: Smart Size Chart Stylesheet
 * Chuẩn Brand Shopify / Modern High-Converting E-commerce UI
 * Tác giả: Hoàng Đức Văn (facebook.com/vawnnnn)
 */

/* ==========================================================================
   1. TRIGGER BUTTON TRÊN TRANG SẢN PHẨM (DƯỚI GIÁ / TRÊN BIẾN THỂ)
   ========================================================================== */
.pod-size-chart-trigger-wrap {
    display: block !important;
    margin: 8px 0 12px 0 !important;
    padding: 0 !important;
    clear: both !important;
}

button.pod-size-chart-btn,
.pod-size-chart-btn {
    all: unset !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    color: #1e293b !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    cursor: pointer !important;
    padding: 3px 0 !important;
    transition: color 0.15s ease, opacity 0.15s ease !important;
    user-select: none !important;
    vertical-align: middle !important;
}

.pod-size-chart-btn:hover {
    color: #ea580c !important;
}

.pod-size-chart-btn:hover .pod-sc-btn-label {
    text-decoration: underline !important;
}

.pod-sc-ruler-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ea580c !important;
    flex-shrink: 0 !important;
    transform: rotate(0deg) !important;
    transition: transform 0.2s ease !important;
}

.pod-size-chart-btn:hover .pod-sc-ruler-icon {
    transform: rotate(-10deg) scale(1.1) !important;
}

.pod-sc-btn-label {
    letter-spacing: -0.1px !important;
}

.pod-sc-btn-label strong {
    font-weight: 600 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   2. MODAL DIALOG CONTAINER & BACKDROP
   ========================================================================== */
body.pod-sc-modal-open {
    overflow: hidden !important;
}

.pod-sc-modal {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.pod-sc-modal.is-open {
    display: flex !important;
}

.pod-sc-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 1 !important;
    animation: podScFadeIn 0.2s ease !important;
}

.pod-sc-dialog {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    max-width: 660px !important;
    max-height: 90vh !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 10px 20px -5px rgba(0, 0, 0, 0.1) !important;
    padding: 28px 24px 24px 24px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    animation: podScScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Nút đóng modal tròn góc trên bên phải */
button.pod-sc-close-btn,
.pod-sc-close-btn {
    all: unset !important;
    box-sizing: border-box !important;
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    transition: background-color 0.15s, color 0.15s, transform 0.15s !important;
}

.pod-sc-close-btn:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
    transform: scale(1.08) !important;
}

/* ==========================================================================
   3. MODAL HEADER (BADGE, TIÊU ĐỀ, PHỤ ĐỀ, HỘP THÔNG BÁO QUAN TRỌNG)
   ========================================================================== */
.pod-sc-header {
    text-align: center !important;
    margin-bottom: 20px !important;
}

.pod-sc-badge {
    display: inline-block !important;
    background: #ffedd5 !important;
    color: #ea580c !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    padding: 3px 12px !important;
    border-radius: 99px !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
}

.pod-sc-title {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
    letter-spacing: -0.4px !important;
    margin: 0 0 6px 0 !important;
}

.pod-sc-subtitle {
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin: 0 auto 14px auto !important;
    max-width: 480px !important;
}

/* Hộp thông báo cam nhạt (Ảnh mẫu của khách) */
.pod-sc-notice {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    background: #fff7ed !important;
    border: 1px solid #ffedd5 !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    text-align: left !important;
    margin-top: 10px !important;
}

.pod-sc-notice-icon {
    color: #ea580c !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
    display: inline-flex !important;
}

.pod-sc-notice-text {
    font-size: 12px !important;
    color: #9a3412 !important;
    line-height: 1.45 !important;
}

/* ==========================================================================
   4. PILL TABS NAVIGATION (T-SHIRT, HOODIE, SWEATSHIRT...)
   ========================================================================== */
.pod-sc-tabs-wrap {
    margin-bottom: 20px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 2px 2px 6px 2px !important;
}

.pod-sc-tabs-wrap::-webkit-scrollbar {
    height: 3px !important;
}
.pod-sc-tabs-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 3px !important;
}

.pod-sc-tabs-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
}

button.pod-sc-pill-tab,
.pod-sc-pill-tab {
    all: unset !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #475569 !important;
    background-color: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    user-select: none !important;
}

.pod-sc-pill-tab:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Tab Active: Màu cam gradient nổi bật và viền bóng nhẹ (Ảnh mẫu) */
.pod-sc-pill-tab.is-active {
    background: linear-gradient(135deg, #ff5722 0%, #f4511e 100%) !important;
    border-color: #f4511e !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(244, 81, 30, 0.35) !important;
    transform: translateY(-1px) !important;
}

/* ==========================================================================
   5. SHOWCASE CARD & SIZE CHART IMAGE
   ========================================================================== */
.pod-sc-content-area {
    position: relative !important;
    min-height: 280px !important;
}

.pod-sc-pane {
    display: none;
}

.pod-sc-pane.is-active {
    display: block !important;
    animation: podScFadeIn 0.25s ease !important;
}

.pod-sc-pane-heading {
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 12px 0 !important;
    letter-spacing: -0.2px !important;
}

.pod-sc-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
}

.pod-sc-img-showcase {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: zoom-in !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    padding: 4px !important;
    transition: transform 0.2s ease !important;
}

.pod-sc-img-showcase:hover {
    transform: scale(1.01) !important;
}

.pod-sc-chart-img {
    max-width: 100% !important;
    max-height: 520px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 6px !important;
}

/* Badge gợi ý Zoom Fullscreen góc dưới bên phải ảnh */
.pod-sc-zoom-badge {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    background: rgba(15, 23, 42, 0.72) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    pointer-events: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    transition: background-color 0.15s ease !important;
}

.pod-sc-img-showcase:hover .pod-sc-zoom-badge {
    background: rgba(15, 23, 42, 0.88) !important;
}

.pod-sc-no-img {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #94a3b8 !important;
    font-size: 13px !important;
}

/* ==========================================================================
   6. FULLSCREEN ZOOM LIGHTBOX
   ========================================================================== */
.pod-sc-lightbox {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000000 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.pod-sc-lightbox.is-open {
    display: flex !important;
}

.pod-sc-lightbox-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.88) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    cursor: zoom-out !important;
    z-index: 1 !important;
    animation: podScFadeIn 0.2s ease !important;
}

.pod-sc-lightbox-dialog {
    position: relative !important;
    z-index: 2 !important;
    max-width: 94vw !important;
    max-height: 92vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: podScScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

button.pod-sc-lightbox-close,
.pod-sc-lightbox-close {
    all: unset !important;
    box-sizing: border-box !important;
    position: absolute !important;
    top: -44px !important;
    right: 0 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-size: 24px !important;
    font-weight: 300 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}

.pod-sc-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.38) !important;
    transform: scale(1.08) !important;
}

.pod-sc-lightbox-body {
    background: #ffffff !important;
    border-radius: 10px !important;
    padding: 6px !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.6) !important;
    max-width: 94vw !important;
    max-height: 85vh !important;
    overflow: auto !important;
}

.pod-sc-lightbox-img {
    max-width: 100% !important;
    max-height: 82vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 6px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* ==========================================================================
   7. KEYFRAME ANIMATIONS & RESPONSIVE
   ========================================================================== */
@keyframes podScFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes podScScaleIn {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
    .pod-sc-dialog {
        padding: 22px 14px 18px 14px !important;
        border-radius: 12px !important;
        max-height: 94vh !important;
    }

    .pod-sc-title {
        font-size: 20px !important;
    }

    .pod-sc-subtitle {
        font-size: 12px !important;
    }

    .pod-sc-notice {
        padding: 8px 10px !important;
        font-size: 11px !important;
    }

    .pod-sc-tabs-nav {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 6px !important;
    }

    button.pod-sc-pill-tab,
    .pod-sc-pill-tab {
        padding: 6px 12px !important;
        font-size: 11px !important;
        flex-shrink: 0 !important;
    }

    .pod-sc-card {
        padding: 8px !important;
    }

    .pod-sc-chart-img {
        max-height: 400px !important;
    }
}
