/* Size Selection Modal Styles */
.wd-size-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.wd-size-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

.wd-size-modal-content {
    position: absolute;
    background: #fff;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

/* Desktop styles */
@media (min-width: 769px) {
    .wd-size-modal-content {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 8px;
        max-width: 500px;
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .wd-size-modal.wd-modal-hidden .wd-size-modal-content {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
}

/* Mobile styles - slide from bottom */
@media (max-width: 768px) {
    .wd-size-modal-content {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        overflow-y: auto;
    }
    
    .wd-size-modal.wd-modal-visible .wd-size-modal-content {
        transform: translateY(0);
    }
}

.wd-size-modal-close {
    position: absolute;
    top: 15px;
    right: 1px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    z-index: 10;
}

.wd-size-modal-close:hover {
    color: #333;
}

@media (max-width: 768px) {
    .wd-size-modal-close {
        display: none;
    }
}

.wd-size-modal-content h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.wd-size-modal-content > p {
    margin: 0 0 25px;
    color: #666;
    font-size: 14px;
}

.wd-size-group {
    margin-bottom: 20px;
}

.wd-size-group:last-child {
    margin-bottom: 0;
}

.wd-size-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.wd-size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background-color: #fff;
}

.wd-size-modal-close {
    position: absolute;
    top: 15px;
    right: 1px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.wd-size-btn:hover {
    border-color: #333;
    background: #f8f8f8;
}

.wd-size-btn.active {
    border-color: #333;
    background: #333;
    color: #fff;
}

/* Prevent body scroll when modal is open */
body.wd-modal-open {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wd-size-modal-content {
        padding: 0;
        padding-bottom: 20px;
    }
    
    .wd-size-modal-content h3 {
        font-size: 18px;
        padding: 20px 20px 10px;
        margin-bottom: 0;
        font-weight: 600;
    }
    
    .wd-size-modal-content > p {
        display: none;
    }
    
    .wd-size-group {
        margin-bottom: 0;
    }
    
    .wd-size-group label {
        display: none;
    }
    
    .wd-size-buttons {
        flex-direction: column;
        gap: 0;
    }
    
    .wd-size-btn {
        width: 100%;
        padding: 18px 20px;
        font-size: 16px;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #e5e5e5;
        text-align: left;
        background-color: #fff;
        font-weight: 400;
        color: #1a1a1a;
    }
    
    .wd-size-btn:hover {
        background: #fafafa;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .wd-size-btn.active {
        background: #fff;
        color: #1a1a1a;
        font-weight: 600;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .wd-size-btn:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .wd-size-btn {
        padding: 16px 20px;
        font-size: 15px;
        background-color: #fff;
        text-align: left !important;
    }
}