/* ==========================================================================
   🎯 PRODUCTION-GRADE SW DIRECT OVERFLOW STYLING BLOCK
   ========================================================================== */

.sw-size-chart-wrapper {
    margin: 20px 0;
    display: block;
}

.sw-premium-chart-trigger {
    background: transparent;
    border: none;
    color: #148b9b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
    text-transform: capitalize;
    border-bottom: 1px dashed #148b9b;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.sw-premium-chart-trigger:hover {
    color: #0b5e6a;
    border-bottom-style: solid;
}

/* Glassmorphism Frosted Background Frame */
.sw-modal-blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    box-sizing: border-box;
}

/* Card Geometry Configuration */
.sw-modal-responsive-card {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    max-height: 85vh; 
    animation: swSlideUp 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    box-sizing: border-box;
}

.sw-modal-top-bar {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sw-modal-top-bar h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111111;
}

.sw-modal-close-icon {
    background: #f5f5f5;
    color: #111111;
    border: none;
    font-size: 18px;
    width: 28px;
    height: 28px;
    line-height: 26px;
    cursor: pointer;
    border-radius: 50%;
    text-align: center;
    transition: all 0.2s ease;
}

.sw-modal-close-icon:hover {
    background: #ff3333;
    color: #ffffff;
}

.sw-modal-scrollable-body {
    padding: 16px 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* 📱 100% UNBROKEN HORIZONTAL SWIPE CONTAINER */
.sw-table-mobile-scroller, 
div[class*="sw-table"], 
div[class^="sw-table"] {
    width: 100% !important;
    display: block !important;
    overflow-x: auto !important; 
    -webkit-overflow-scrolling: touch !important; /* Forces momentum fluid slide on iOS Safari */
    margin: 8px 0;
    border: 1px solid #eeeeee;
    border-radius: 6px;
}

/* Safe Scaling Table Rule */
.sw-table-mobile-scroller table,
.sw-modal-scrollable-body table {
    width: 100% !important;
    min-width: 480px !important; /* Crucial: Prevents shrinking/crunching on devices like iPhone SE */
    border-collapse: collapse;
    margin: 0 !important;
    table-layout: auto !important;
}

/* Grid Matrix Alignment */
.sw-modal-scrollable-body table th,
.sw-modal-scrollable-body table td {
    padding: 10px 14px !important;
    font-size: 13px !important;
    text-align: center !important; 
    color: #333333;
    border-bottom: 1px solid #eeeeee;
    white-space: nowrap !important; /* No text wrapping chaos */
}

.sw-modal-scrollable-body table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #000000;
}

.sw-modal-scrollable-body table tr:last-child td {
    border-bottom: none;
}

.sw-modal-scrollable-body table tr:nth-child(even) {
    background-color: #fafafa;
}

@keyframes swSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
body.sw-size-chart-open {
    overflow: hidden;
}

.sw-premium-chart-trigger svg {
    flex: 0 0 auto;
    margin-right: 7px;
}

/* Easy Builder storefront output. */
.sw-generated-chart {
    width: 100%;
}

.sw-generated-chart__unit {
    padding: 10px 14px 6px;
    color: #72777f;
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.sw-generated-chart__table th[scope="row"] {
    background: #ffffff;
    color: #111111;
    font-weight: 700;
}

.sw-size-chart-notes {
    padding: 12px 14px 6px;
    border-top: 1px solid #eeeeee;
    color: #555b63;
    font-size: 13px;
    line-height: 1.6;
}

.sw-size-chart-notes > :first-child {
    margin-top: 0;
}

.sw-size-chart-notes > :last-child {
    margin-bottom: 0;
}
