/* overlay - always flex, but hidden with opacity and visibility */
#size-selector-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* When popup is shown */
#size-selector-popup.show {
    opacity: 1;
    visibility: visible;
}

/* popup content */
#size-selector-popup .custom-size-popup-content {
    background: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    text-align: center;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

/* When popup is shown, slide content up */
#size-selector-popup.show .custom-size-popup-content {
    transform: translateY(0);
}

/* popup title */
#size-selector-popup h3 {
    margin: 0;
    padding: 16px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    font-weight: 600;
}

/* size list container */
.popup-size-list {
    width: 100%;
}

/* table row hover effect */
.popup-size-list tr:hover {
    background-color: #f5f5f5;
}

/* close button row styling */
#popup-close-row:hover {
    background-color: #ddd !important;
}

/* przycisk zamknięcia (keep as fallback, but now hidden since we use table row) */
#popup-close {
    display: none;
}

/* mobile – pełna szerokość */
@media (max-width: 768px){
    #size-selector-popup .custom-size-popup-content {
        width: 100%;
        border-radius: 0;
    }
}