/* Container Fix for Flexbox Themes */
.ewap-wrapper { 
    margin: 20px 0; 
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    display: block;
    /* Force line break in flex containers */
    flex: 0 0 100%; 
}

.ewap-wrapper h3 { font-size: 18px; margin-bottom: 15px; }

/* Grid Item */
.ewap-item { 
    display: block; 
    cursor: pointer; 
    position: relative; 
    width: 100%;
    margin: 0;
}
.ewap-item input { position: absolute; opacity: 0; z-index: -1; }

/* Box Styling */
.ewap-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Featured Image */
.ewap-thumb {
    width: 45px; /* Fixed small size */
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    border: 1px solid #eee;
}

/* Custom Checkbox */
.ewap-check {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
    transition: 0.2s;
    background: #fff;
}
.ewap-check::after {
    content: '';
    position: absolute;
    left: 5px; top: 1px;
    width: 4px; height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}
.ewap-item input:checked + .ewap-box .ewap-check::after { opacity: 1; }

.ewap-info { 
    display: flex; 
    flex-direction: column; 
    line-height: 1.3; 
    flex-grow: 1;
    overflow: hidden;
}
.ewap-name { display: block; word-wrap: break-word; }

/* Summary Table */
#ewap-summary {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}
.ewap-table { width: 100%; border-collapse: collapse; margin: 0; }
.ewap-table td, .ewap-table th { padding: 5px 0; text-align: right; font-size: 0.9em; }
.ewap-table td:first-child, .ewap-table th:first-child { text-align: left; }
.ewap-table tfoot th { border-top: 1px solid #ddd; padding-top: 8px; font-size: 1.1em; }